 /* 4a84e003-fd67-4271-bee7-79d008151014 */
(function(a, t) {
    function n(a) {
        for (var d in a)
            if (N[a[d]] !== t)
                return !0;
        return !1
    }
    function r(d, c, g) {
        var n = d;
        if ("object" === typeof c)
            return d.each(function() {
                D[this.id] && D[this.id].destroy();
                new a.mobiscroll.classes[c.component || "Scroller"](this, c)
            });
        "string" === typeof c && d.each(function() {
            var a;
            if ((a = D[this.id]) && a[c])
                if (a = a[c].apply(this, Array.prototype.slice.call(g, 1)), a !== t)
                    return n = a, !1
        });
        return n
    }
    var g = +new Date, D = {}, u = a.extend, N = document.createElement("modernizr").style, p = n(["perspectiveProperty", 
        "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]), M = n(["flex", "msFlex", "WebkitBoxDirection"]), c = function() {
        var a = ["Webkit", "Moz", "O", "ms"], d;
        for (d in a)
            if (n([a[d] + "Transform"]))
                return "-" + a[d].toLowerCase() + "-";
        return ""
    }(), d = c.replace(/^\-/, "").replace(/\-$/, "").replace("moz", "Moz");
    a.fn.mobiscroll = function(d) {
        u(this, a.mobiscroll.components);
        return r(this, d, arguments)
    };
    a.mobiscroll = a.mobiscroll || {version: "2.15.1",util: {prefix: c,jsPrefix: d,has3d: p,hasFlex: M,testTouch: function(d, 
            c) {
                if ("touchstart" == d.type)
                    a(c).attr("data-touch", "1");
                else if (a(c).attr("data-touch"))
                    return a(c).removeAttr("data-touch"), !1;
                return !0
            },objectToArray: function(a) {
                var d = [], c;
                for (c in a)
                    d.push(a[c]);
                return d
            },arrayToObject: function(a) {
                var d = {}, c;
                if (a)
                    for (c = 0; c < a.length; c++)
                        d[a[c]] = a[c];
                return d
            },isNumeric: function(a) {
                return 0 <= a - parseFloat(a)
            },isString: function(a) {
                return "string" === typeof a
            },getCoord: function(a, d) {
                var c = a.originalEvent || a;
                return c.changedTouches ? c.changedTouches[0]["page" + d] : a["page" + 
                d]
            },getPosition: function(d, c) {
                var g = window.getComputedStyle ? getComputedStyle(d[0]) : d[0].style, n, r;
                p ? (a.each(["t", "webkitT", "MozT", "OT", "msT"], function(a, d) {
                    if (g[d + "ransform"] !== t)
                        return n = g[d + "ransform"], !1
                }), n = n.split(")")[0].split(", "), r = c ? n[13] || n[5] : n[12] || n[4]) : r = c ? g.top.replace("px", "") : g.left.replace("px", "");
                return r
            },constrain: function(a, d, c) {
                return Math.max(d, Math.min(a, c))
            },vibrate: function(a) {
                "vibrate" in navigator && navigator.vibrate(a || 50)
            }},tapped: !1,autoTheme: "mobiscroll",presets: {scroller: {},
            numpad: {},listview: {},menustrip: {}},themes: {frame: {},listview: {},menustrip: {}},i18n: {},instances: D,classes: {},components: {},defaults: {context: "body",mousewheel: !0,vibrate: !0},setDefaults: function(a) {
            u(this.defaults, a)
        },presetShort: function(a, d, c) {
            this.components[a] = function(g) {
                return r(this, u(g, {component: d,preset: !1 === c ? t : a}), arguments)
            }
        }};
    a.mobiscroll.classes.Base = function(d, c) {
        var n, r, p, t, N, M, y = a.mobiscroll, v = this;
        v.settings = {};
        v._presetLoad = function() {
        };
        v._init = function(a) {
            p = v.settings;
            u(c, a);
            v._hasDef && (M = y.defaults);
            u(p, v._defaults, M, c);
            if (v._hasTheme) {
                N = p.theme;
                if ("auto" == N || !N)
                    N = y.autoTheme;
                "default" == N && (N = "mobiscroll");
                c.theme = N;
                t = y.themes[v._class][N]
            }
            v._hasLang && (n = y.i18n[p.lang]);
            v._hasTheme && v.trigger("onThemeLoad", [n, c]);
            u(p, t, n, M, c);
            if (v._hasPreset && (v._presetLoad(p), r = y.presets[v._class][p.preset]))
                r = r.call(d, v), u(p, r, c)
        };
        v._destroy = function() {
            v.trigger("onDestroy", []);
            delete D[d.id];
            v = null
        };
        v.trigger = function(g, n) {
            var s;
            n.push(v);
            a.each([M, t, r, c], function(a, c) {
                c && c[g] && (s = 
                c[g].apply(d, n))
            });
            return s
        };
        v.option = function(a, d) {
            var c = {};
            "object" === typeof a ? c = a : c[a] = d;
            v.init(c)
        };
        v.getInst = function() {
            return v
        };
        c = c || {};
        d.id || (d.id = "mobiscroll" + ++g);
        D[d.id] = v
    }
})(jQuery);
(function(a, t, n, r) {
    var g, D, u = a.mobiscroll, N = u.instances, p = u.util, M = p.jsPrefix, c = p.has3d, d = p.getCoord, ta = p.constrain, qa = p.isString, la = /android [1-3]/i.test(navigator.userAgent), p = /(iphone|ipod|ipad).* os 8_/i.test(navigator.userAgent), aa = function() {
    }, ha = function(a) {
        a.preventDefault()
    };
    u.classes.Frame = function(p, Y, ea) {
        function y(b) {
            A && A.removeClass("dwb-a");
            A = a(this);
            !A.hasClass("dwb-d") && !A.hasClass("dwb-nhl") && A.addClass("dwb-a");
            if ("mousedown" === b.type)
                a(n).on("mouseup", v)
        }
        function v(b) {
            A && (A.removeClass("dwb-a"), 
            A = null);
            "mouseup" === b.type && a(n).off("mouseup", v)
        }
        function Z(a) {
            13 == a.keyCode ? e.select() : 27 == a.keyCode && e.cancel()
        }
        function S(d) {
            var c, f, h, l = b.focusOnClose;
            B.remove();
            g && !d && setTimeout(function() {
                if (l === r || !0 === l) {
                    D = !0;
                    c = g[0];
                    h = c.type;
                    f = c.value;
                    try {
                        c.type = "button"
                    } catch (b) {
                    }
                    g.focus();
                    c.type = h;
                    c.value = f
                } else
                    l && (N[a(l).attr("id")] && (u.tapped = !1), a(l).focus())
            }, 200);
            e._isVisible = !1;
            F("onHide", [])
        }
        function s(a) {
            clearTimeout(K[a.type]);
            K[a.type] = setTimeout(function() {
                var b = "scroll" == a.type;
                (!b || l) && e.position(!b)
            }, 
            200)
        }
        function V(a) {
            console.log(typeof a);
            console.log(a);
            console.log(o);
//            o[0].contains(a.target) || o.focus()
        }
        function W(b, d) {
            u.tapped || (b && b(), a(n.activeElement).is("input,textarea") && a(n.activeElement).blur(), g = d, e.show());
            setTimeout(function() {
                D = false
            }, 300)
        }
        var I, fa, da, B, ia, H, o, X, w, h, A, T, F, q, O, k, E, C, J, b, l, P, $, ba, e = this, L = a(p), Q = [], K = {};
        u.classes.Base.call(this, p, Y, !0);
        e.position = function(d) {
            var c, f, h, g, j, x, q, m, R, Da, Ba = 0, v = 0;
            R = {};
            var U = Math.min(X[0].innerWidth || X.innerWidth(), H.width()), G = X[0].innerHeight || X.innerHeight();
            if (!($ === U && ba === G && d || J))
                if ((e._isFullScreen || 
                /top|bottom/.test(b.display)) && o.width(U), !1 !== F("onPosition", [B, U, G]) && O) {
                    f = X.scrollLeft();
                    d = X.scrollTop();
                    g = b.anchor === r ? L : a(b.anchor);
                    e._isLiquid && "liquid" !== b.layout && (400 > U ? B.addClass("dw-liq") : B.removeClass("dw-liq"));
                    !e._isFullScreen && /modal|bubble/.test(b.display) && (w.width(""), a(".mbsc-w-p", B).each(function() {
                        c = a(this).outerWidth(!0);
                        Ba += c;
                        v = c > v ? c : v
                    }), c = Ba > U ? v : Ba, w.width(c).css("white-space", Ba > U ? "" : "nowrap"));
                    k = e._isFullScreen ? U : o.outerWidth();
                    E = e._isFullScreen ? G : o.outerHeight(!0);
                    l = E <= 
                    G && k <= U;
                    e.scrollLock = l;
                    "modal" == b.display ? (f = Math.max(0, f + (U - k) / 2), h = d + (G - E) / 2) : "bubble" == b.display ? (Da = !0, m = a(".dw-arrw-i", B), h = g.offset(), x = Math.abs(fa.offset().top - h.top), q = Math.abs(fa.offset().left - h.left), j = g.outerWidth(), g = g.outerHeight(), f = ta(q - (o.outerWidth(!0) - j) / 2, f + 3, f + U - k - 3), h = x - E, h < d || x > d + G ? (o.removeClass("dw-bubble-top").addClass("dw-bubble-bottom"), h = x + g) : o.removeClass("dw-bubble-bottom").addClass("dw-bubble-top"), m = m.outerWidth(), j = ta(q + j / 2 - (f + (k - m) / 2), 0, m), a(".dw-arr", B).css({left: j})) : 
                    "top" == b.display ? h = d : "bottom" == b.display && (h = d + G - E);
                    h = 0 > h ? 0 : h;
                    R.top = h;
                    R.left = f;
                    o.css(R);
                    H.height(0);
                    R = Math.max(h + E, "body" == b.context ? a(n).height() : fa[0].scrollHeight);
                    H.css({height: R});
                    if (Da && (h + E > d + G || x > d + G))
                        J = !0, setTimeout(function() {
                            J = false
                        }, 300), X.scrollTop(Math.min(h + E - G, R - G));
                    $ = U;
                    ba = G
                }
        };
        e.attachShow = function(a, d) {
            Q.push({readOnly: a.prop("readonly"),el: a});
            if ("inline" !== b.display) {
                if (P && a.is("input"))
                    a.prop("readonly", !0).on("mousedown.dw", function(a) {
                        a.preventDefault()
                    });
                if (b.showOnFocus)
                    a.on("focus.dw", 
                    function() {
                        D || W(d, a)
                    });
                b.showOnTap && (a.on("keydown.dw", function(b) {
                    if (32 == b.keyCode || 13 == b.keyCode)
                        b.preventDefault(), b.stopPropagation(), W(d, a)
                }), e.tap(a, function() {
                    W(d, a)
                }))
            }
        };
        e.select = function() {
            if (!O || !1 !== e.hide(!1, "set"))
                e._fillValue(), F("onSelect", [e._value])
        };
        e.cancel = function() {
            (!O || !1 !== e.hide(!1, "cancel")) && F("onCancel", [e._value])
        };
        e.clear = function() {
            F("onClear", [B]);
            O && !e.live && e.hide(!1, "clear");
            e.setVal(null, !0)
        };
        e.enable = function() {
            b.disabled = !1;
            e._isInput && L.prop("disabled", !1)
        };
        e.disable = function() {
            b.disabled = !0;
            e._isInput && L.prop("disabled", !0)
        };
        e.show = function(d, g) {
            var f;
            if (!b.disabled && !e._isVisible) {
                !1 !== T && ("top" == b.display && (T = "slidedown"), "bottom" == b.display && (T = "slideup"));
                e._readValue();
                F("onBeforeShow", []);
                f = '<div lang="' + b.lang + '" class="mbsc-' + b.theme + (b.baseTheme ? " mbsc-" + b.baseTheme : "") + " dw-" + b.display + " " + (b.cssClass || "") + (e._isLiquid ? " dw-liq" : "") + (la ? " mbsc-old" : "") + (q ? "" : " dw-nobtn") + '"><div class="dw-persp">' + (O ? '<div class="dwo"></div>' : "") + "<div" + (O ? 
                ' role="dialog" tabindex="-1"' : "") + ' class="dw' + (b.rtl ? " dw-rtl" : " dw-ltr") + '">' + ("bubble" === b.display ? '<div class="dw-arrw"><div class="dw-arrw-i"><div class="dw-arr"></div></div></div>' : "") + '<div class="dwwr"><div aria-live="assertive" class="dw-aria dw-hidden"></div>' + (b.headerText ? '<div class="dwv">' + (qa(b.headerText) ? b.headerText : "") + "</div>" : "") + '<div class="dwcc">';
                f += e._generateContent();
                f += "</div>";
                q && (f += '<div class="dwbc">', a.each(h, function(a, d) {
                    d = qa(d) ? e.buttons[d] : d;
                    if (d.handler === "set")
                        d.parentClass = 
                        "dwb-s";
                    if (d.handler === "cancel")
                        d.parentClass = "dwb-c";
                    d.handler = qa(d.handler) ? e.handlers[d.handler] : d.handler;
                    f = f + ("<div" + (b.btnWidth ? ' style="width:' + 100 / h.length + '%"' : "") + ' class="dwbw ' + (d.parentClass || "") + '"><div tabindex="0" role="button" class="dwb' + a + " dwb-e " + (d.cssClass === r ? b.btnClass : d.cssClass) + (d.icon ? " mbsc-ic mbsc-ic-" + d.icon : "") + '">' + (d.text || "") + "</div></div>")
                }), f += "</div>");
                f += "</div></div></div></div>";
                B = a(f);
                H = a(".dw-persp", B);
                ia = a(".dwo", B);
                w = a(".dwwr", B);
                da = a(".dwv", B);
                o = a(".dw", 
                B);
                I = a(".dw-aria", B);
                e._markup = B;
                e._header = da;
                e._isVisible = !0;
                C = "orientationchange resize";
                e._markupReady(B);
                F("onMarkupReady", [B]);
                if (O) {
                    a(t).on("keydown", Z);
                    if (b.scrollLock)
                        B.on("touchmove mousewheel wheel", function(a) {
                            l && a.preventDefault()
                        });
                    "Moz" !== M && a("input,select,button", fa).each(function() {
                        this.disabled || a(this).addClass("dwtd").prop("disabled", true)
                    });
                    C += " scroll";
                    u.activeInstance = e;
                    B.appendTo(fa);
                    c && T && !d && B.addClass("dw-in dw-trans").on("webkitAnimationEnd animationend", function() {
                        B.off("webkitAnimationEnd animationend").removeClass("dw-in dw-trans").find(".dw").removeClass("dw-" + 
                        T);
                        g || o.focus();
                        e.ariaMessage(b.ariaMessage)
                    }).find(".dw").addClass("dw-" + T)
                } else
                    L.is("div") && !e._hasContent ? L.html(B) : B.insertAfter(L);
                F("onMarkupInserted", [B]);
                e.position();
                X.on(C, s).on("focusin", V);
                B.on("selectstart mousedown", ha).on("click", ".dwb-e", ha).on("keydown", ".dwb-e", function(b) {
                    if (b.keyCode == 32) {
                        b.preventDefault();
                        b.stopPropagation();
                        a(this).click()
                    }
                }).on("keydown", function(b) {
                    if (b.keyCode == 32)
                        b.preventDefault();
                    else if (b.keyCode == 9) {
                        var d = B.find('[tabindex="0"]').filter(function() {
                            return this.offsetWidth > 
                            0 || this.offsetHeight > 0
                        }), c = d.index(a(":focus", B)), e = d.length - 1, f = 0;
                        if (b.shiftKey) {
                            e = 0;
                            f = -1
                        }
                        if (c === e) {
                            d.eq(f).focus();
                            b.preventDefault()
                        }
                    }
                });
                a("input", B).on("selectstart mousedown", function(a) {
                    a.stopPropagation()
                });
                setTimeout(function() {
                    a.each(h, function(b, d) {
                        e.tap(a(".dwb" + b, B), function(a) {
                            d = qa(d) ? e.buttons[d] : d;
                            d.handler.call(this, a, e)
                        }, true)
                    });
                    b.closeOnOverlay && e.tap(ia, function() {
                        e.cancel()
                    });
                    if (O && !T) {
                        g || o.focus();
                        e.ariaMessage(b.ariaMessage)
                    }
                    B.on("touchstart mousedown", ".dwb-e", y).on("touchend", 
                    ".dwb-e", v);
                    e._attachEvents(B)
                }, 300);
                F("onShow", [B, e._tempValue])
            }
        };
        e.hide = function(b, d, f) {
            if (!e._isVisible || !f && !e._isValid && "set" == d || !f && !1 === F("onClose", [e._tempValue, d]))
                return !1;
            if (B) {
                "Moz" !== M && a(".dwtd", fa).each(function() {
                    a(this).prop("disabled", !1).removeClass("dwtd")
                });
                if (c && O && T && !b && !B.hasClass("dw-trans"))
                    B.addClass("dw-out dw-trans").find(".dw").addClass("dw-" + T).on("webkitAnimationEnd animationend", function() {
                        S(b)
                    });
                else
                    S(b);
                X.off(C, s).off("focusin", V)
            }
            O && (a(t).off("keydown", Z), delete u.activeInstance)
        };
        e.ariaMessage = function(a) {
            I.html("");
            setTimeout(function() {
                I.html(a)
            }, 100)
        };
        e.isVisible = function() {
            return e._isVisible
        };
        e.setVal = aa;
        e._generateContent = aa;
        e._attachEvents = aa;
        e._readValue = aa;
        e._fillValue = aa;
        e._markupReady = aa;
        e._processSettings = aa;
        e._presetLoad = function(a) {
            a.buttons = a.buttons || ("inline" !== a.display ? ["set", "cancel"] : []);
            a.headerText = a.headerText === r ? "inline" !== a.display ? "{value}" : !1 : a.headerText
        };
        e.tap = function(a, c, e) {
            var h, l, j;
            if (b.tap)
                a.on("touchstart.dw", function(a) {
                    e && a.preventDefault();
                    h = d(a, "X");
                    l = d(a, "Y");
                    j = !1
                }).on("touchmove.dw", function(a) {
                    if (20 < Math.abs(d(a, "X") - h) || 20 < Math.abs(d(a, "Y") - l))
                        j = !0
                }).on("touchend.dw", function(a) {
                    j || (a.preventDefault(), c.call(this, a));
                    u.tapped = !0;
                    setTimeout(function() {
                        u.tapped = false
                    }, 500)
                });
            a.on("click.dw", function(a) {
                u.tapped || c.call(this, a);
                a.preventDefault()
            })
        };
        e.destroy = function() {
            e.hide(!0, !1, !0);
            a.each(Q, function(a, b) {
                b.el.off(".dw").prop("readonly", b.readOnly)
            });
            e._destroy()
        };
        e.init = function(d) {
            e._init(d);
            e._isLiquid = "liquid" === (b.layout || 
            (/top|bottom/.test(b.display) ? "liquid" : ""));
            e._processSettings();
            L.off(".dw");
            T = la ? !1 : b.animate;
            h = b.buttons || [];
            O = "inline" !== b.display;
            P = b.showOnFocus || b.showOnTap;
            X = a("body" == b.context ? t : b.context);
            fa = a(b.context);
            e.context = X;
            e.live = !0;
            a.each(h, function(a, b) {
                if ("ok" == b || "set" == b || "set" == b.handler)
                    return e.live = !1
            });
            e.buttons.set = {text: b.setText,handler: "set"};
            e.buttons.cancel = {text: e.live ? b.closeText : b.cancelText,handler: "cancel"};
            e.buttons.clear = {text: b.clearText,handler: "clear"};
            e._isInput = L.is("input");
            q = 0 < h.length;
            e._isVisible && e.hide(!0, !1, !0);
            F("onInit", []);
            O ? (e._readValue(), e._hasContent || e.attachShow(L)) : e.show();
            L.on("change.dw", function() {
                e._preventChange || e.setVal(L.val(), true, false);
                e._preventChange = false
            })
        };
        e.buttons = {};
        e.handlers = {set: e.select,cancel: e.cancel,clear: e.clear};
        e._value = null;
        e._isValid = !0;
        e._isVisible = !1;
        b = e.settings;
        F = e.trigger;
        ea || e.init(Y)
    };
    u.classes.Frame.prototype._defaults = {lang: "en",setText: "Set",selectedText: "Selected",closeText: "Close",cancelText: "Cancel",clearText: "Clear",
        disabled: !1,closeOnOverlay: !0,showOnFocus: !1,showOnTap: !0,display: "modal",scrollLock: !0,tap: !0,btnClass: "dwb",btnWidth: !0,focusOnClose: !p};
    u.themes.frame.mobiscroll = {rows: 5,showLabel: !1,headerText: !1,btnWidth: !1,selectedLineHeight: !0,selectedLineBorder: 1,dateOrder: "MMddyy",weekDays: "min",checkIcon: "ion-ios7-checkmark-empty",btnPlusClass: "mbsc-ic mbsc-ic-arrow-down5",btnMinusClass: "mbsc-ic mbsc-ic-arrow-up5",btnCalPrevClass: "mbsc-ic mbsc-ic-arrow-left5",btnCalNextClass: "mbsc-ic mbsc-ic-arrow-right5"};
    a(t).on("focus", function() {
        g && (D = !0)
    });
    a(n).on("mouseover mouseup mousedown click", function(a) {
        if (u.tapped)
            return a.stopPropagation(), a.preventDefault(), !1
    })
})(jQuery, window, document);
(function(a, t, n, r) {
    var g, t = a.mobiscroll, D = t.classes, u = t.util, N = u.jsPrefix, p = u.has3d, M = u.hasFlex, c = u.getCoord, d = u.constrain, ta = u.testTouch;
    t.presetShort("scroller", "Scroller", !1);
    D.Scroller = function(t, la, aa) {
        function ha(m) {
            if (ta(m, this) && !g && !J && !T && !V(this) && a.mobiscroll.running && (m.preventDefault(), m.stopPropagation(), g = !0, F = "clickpick" != k.mode, Q = a(".dw-ul", this), I(Q), ba = (b = ma[K] !== r) ? Math.round(-u.getPosition(Q, !0) / q) : j[K], l = c(m, "Y"), P = new Date, $ = l, B(Q, K, ba, 0.001), F && Q.closest(".dwwl").addClass("dwa"), 
            "mousedown" === m.type))
                a(n).on("mousemove", ka).on("mouseup", Y)
        }
        function ka(a) {
            if (g && F && (a.preventDefault(), a.stopPropagation(), $ = c(a, "Y"), 3 < Math.abs($ - l) || b))
                B(Q, K, d(ba + (l - $) / q, e - 1, L + 1)), b = !0
        }
        function Y(m) {
            if (g) {
                var R = new Date - P, c = d(Math.round(ba + (l - $) / q), e - 1, L + 1), j = c, h, x = Q.offset().top;
                m.stopPropagation();
                g = !1;
                "mouseup" === m.type && a(n).off("mousemove", ka).off("mouseup", Y);
                p && 300 > R ? (h = ($ - l) / R, R = h * h / k.speedUnit, 0 > $ - l && (R = -R)) : R = $ - l;
                if (b)
                    j = d(Math.round(ba - R / q), e, L), R = h ? Math.max(0.1, Math.abs((j - c) / h) * 
                    k.timeUnit) : 0.1;
                else {
                    var c = Math.floor(($ - x) / q), G = a(a(".dw-li", Q)[c]);
                    h = G.hasClass("dw-v");
                    x = F;
                    R = 0.1;
                    !1 !== C("onValueTap", [G]) && h ? j = c : x = !0;
                    x && h && (G.addClass("dw-hl"), setTimeout(function() {
                        G.removeClass("dw-hl")
                    }, 100));
                    if (!O && (!0 === k.confirmOnTap || k.confirmOnTap[K]) && G.hasClass("dw-sel")) {
                        f.select();
                        return
                    }
                }
                F && o(Q, K, j, 0, R, !0)
            }
        }
        function ea(m) {
            T = a(this);
            ta(m, this) && a.mobiscroll.running && s(m, T.closest(".dwwl"), T.hasClass("dwwbp") ? X : w);
            if ("mousedown" === m.type)
                a(n).on("mouseup", y)
        }
        function y(m) {
            T = null;
            J && 
            (clearInterval(ca), J = !1);
            "mouseup" === m.type && a(n).off("mouseup", y)
        }
        function v(m) {
            38 == m.keyCode ? s(m, a(this), w) : 40 == m.keyCode && s(m, a(this), X)
        }
        function Z() {
            J && (clearInterval(ca), J = !1)
        }
        function S(m) {
            if (!V(this) && a.mobiscroll.running) {
                m.preventDefault();
                var m = m.originalEvent || m, b = m.deltaY || m.wheelDelta || m.detail, c = a(".dw-ul", this);
                I(c);
                B(c, K, d(((0 > b ? -20 : 20) - x[K]) / q, e - 1, L + 1));
                clearTimeout(E);
                E = setTimeout(function() {
                    o(c, K, Math.round(j[K]), 0 < b ? 1 : 2, 0.1)
                }, 200)
            }
        }
        function s(a, b, d) {
            a.stopPropagation();
            a.preventDefault();
            if (!J && !V(b) && !b.hasClass("dwa")) {
                J = !0;
                var c = b.find(".dw-ul");
                I(c);
                clearInterval(ca);
                ca = setInterval(function() {
                    d(c)
                }, k.delay);
                d(c)
            }
        }
        function V(m) {
            return a.isArray(k.readonly) ? (m = a(".dwwl", A).index(m), k.readonly[m]) : k.readonly
        }
        function W(m) {
            var b = '<div class="dw-bf">', m = sa[m], d = 1, c = m.labels || [], e = m.values || [], j = m.keys || e;
            a.each(e, function(m, e) {
                0 === d % 20 && (b += '</div><div class="dw-bf">');
                b += '<div role="option" aria-selected="false" class="dw-li dw-v" data-val="' + j[m] + '"' + (c[m] ? ' aria-label="' + c[m] + '"' : 
                "") + ' style="height:' + q + "px;line-height:" + q + 'px;"><div class="dw-i"' + (1 < na ? ' style="line-height:' + Math.round(q / na) + "px;font-size:" + Math.round(0.8 * (q / na)) + 'px;"' : "") + ">" + e + f._processItem(a, 0.2) + "</div></div>";
                d++
            });
            return b += "</div>"
        }
        function I(m) {
            O = m.closest(".dwwl").hasClass("dwwms");
            e = a(".dw-li", m).index(a(O ? ".dw-li" : ".dw-v", m).eq(0));
            L = Math.max(e, a(".dw-li", m).index(a(O ? ".dw-li" : ".dw-v", m).eq(-1)) - (O ? k.rows - ("scroller" == k.mode ? 1 : 3) : 0));
            K = a(".dw-ul", A).index(m)
        }
        function fa(a) {
            var b = k.headerText;
            return b ? "function" === typeof b ? b.call(t, a) : b.replace(/\{value\}/i, a) : ""
        }
        function da(a, b) {
            clearTimeout(ma[b]);
            delete ma[b];
            a.closest(".dwwl").removeClass("dwa")
        }
        function B(a, b, d, c, e) {
            var h = -d * q, f = a[0].style;
            h == x[b] && ma[b] || (x[b] = h, p ? (f[N + "Transition"] = u.prefix + "transform " + (c ? c.toFixed(3) : 0) + "s ease-out", f[N + "Transform"] = "translate3d(0," + h + "px,0)") : f.top = h + "px", ma[b] && da(a, b), c && e && (a.closest(".dwwl").addClass("dwa"), ma[b] = setTimeout(function() {
                da(a, b)
            }, 1E3 * c)), j[b] = d)
        }
        function ia(b, c, j, h, f) {
            var l = 
            a('.dw-li[data-val="' + b + '"]', c), x = a(".dw-li", c), b = x.index(l), g = x.length;
            if (h)
                I(c);
            else if (!l.hasClass("dw-v")) {
                for (var n = l, o = 0, k = 0; 0 <= b - o && !n.hasClass("dw-v"); )
                    o++, n = x.eq(b - o);
                for (; b + k < g && !l.hasClass("dw-v"); )
                    k++, l = x.eq(b + k);
                (k < o && k && 2 !== j || !o || 0 > b - o || 1 == j) && l.hasClass("dw-v") ? b += k : (l = n, b -= o)
            }
            j = l.hasClass("dw-sel");
            f && (h || (a(".dw-sel", c).removeAttr("aria-selected"), l.attr("aria-selected", "true")), a(".dw-sel", c).removeClass("dw-sel"), l.addClass("dw-sel"));
            return {selected: j,v: h ? d(b, e, L) : b,val: l.hasClass("dw-v") ? 
                l.attr("data-val") : null}
        }
        function H(b, d, c, e, j) {
            !1 !== C("validate", [A, d, b, e]) && (a(".dw-ul", A).each(function(c) {
                var h = a(this), l = h.closest(".dwwl").hasClass("dwwms"), x = c == d || d === r, l = ia(f._tempWheelArray[c], h, e, l, !0);
                if (!l.selected || x)
                    f._tempWheelArray[c] = l.val, B(h, c, l.v, x ? b : 0.1, x ? j : !1)
            }), C("onValidated", []), f._tempValue = k.formatValue(f._tempWheelArray, f), f.live && (f._hasValue = c || f._hasValue, h(c, c, 0, !0)), f._header.html(fa(f._tempValue)), c && C("onChange", [f._tempValue]))
        }
        function o(b, c, j, h, l, x) {
            j = d(j, e, L);
            f._tempWheelArray[c] = a(".dw-li", b).eq(j).attr("data-val");
            B(b, c, j, l, x);
            setTimeout(function() {
                H(l, c, !0, h, x)
            }, 10)
        }
        function X(a) {
            var b = j[K] + 1;
            o(a, K, b > L ? e : b, 1, 0.1)
        }
        function w(a) {
            var b = j[K] - 1;
            o(a, K, b < e ? L : b, 2, 0.1)
        }
        function h(a, b, d, c, e) {
            f._isVisible && !c && H(d);
            f._tempValue = k.formatValue(f._tempWheelArray, f);
            e || (f._wheelArray = f._tempWheelArray.slice(0), f._value = f._hasValue ? f._tempValue : null);
            a && (C("onValueFill", [f._hasValue ? f._tempValue : "", b]), f._isInput && oa.val(f._hasValue ? f._tempValue : ""), b && (f._preventChange = 
            !0, oa.change()))
        }
        var A, T, F, q, O, k, E, C, J, b, l, P, $, ba, e, L, Q, K, na, ca, f = this, oa = a(t), ma = {}, j = {}, x = {}, sa = [];
        D.Frame.call(this, t, la, !0);
        f.setVal = f._setVal = function(b, d, c, e, j) {
            f._hasValue = null !== b && b !== r;
            f._tempWheelArray = a.isArray(b) ? b.slice(0) : k.parseValue.call(t, b, f) || [];
            h(d, c === r ? d : c, j, !1, e)
        };
        f.getVal = f._getVal = function(a) {
            a = f._hasValue || a ? f[a ? "_tempValue" : "_value"] : null;
            return u.isNumeric(a) ? +a : a
        };
        f.setArrayVal = f.setVal;
        f.getArrayVal = function(a) {
            return a ? f._tempWheelArray : f._wheelArray
        };
        f.setValue = function(a, 
        b, d, c, e) {
            f.setVal(a, b, e, c, d)
        };
        f.getValue = f.getArrayVal;
        f.changeWheel = function(b, d, c) {
            if (A) {
                var e = 0, j = b.length;
                a.each(k.wheels, function(h, l) {
                    a.each(l, function(h, l) {
                        if (-1 < a.inArray(e, b) && (sa[e] = l, a(".dw-ul", A).eq(e).html(W(e)), j--, !j))
                            return f.position(), H(d, r, c), !1;
                        e++
                    });
                    if (!j)
                        return !1
                })
            }
        };
        f.getValidCell = ia;
        f.scroll = B;
        f._processItem = new Function("$, p", function() {
            var a = [5, 2], b;
            a: {
                b = a[0];
                var d;
                for (d = 0; 16 > d; ++d)
                    if (1 == b * d % 16) {
                        b = [d, a[1]];
                        break a
                    }
                b = void 0
            }
            a = b[0];
            b = b[1];
            d = "";
            var c;
            for (c = 0; 1036 > c; ++c)
                d += 
                "0123456789abcdef"[((a * "0123456789abcdef".indexOf("565c5f59c6c8030d0c0f51015c0d0e0ec85c5b08080f080513080b55c26607560bcacf1e080b55c26607560bca1c12171bce16ce1c1fcf5e5ec7cac7c6c8030d0c0f51015c0d0e0ec80701560f500b1dc6c8030d0c0f51015c0d0e0ec80701560f500b13c7070e0b5c56cac5b65c0f070ec20b5a520f5c0b06c7c2b20e0b07510bc2bb52055c07060bc26701010d5b0856c8c5cf1417cf195c0b565b5c08ca6307560ac85c0708060d03cacf1e521dc51e060f50c251565f0e0b13ccc5c9005b0801560f0d08ca0bcf5950075cc256130bc80e0b0805560ace08ce5c19550a0f0e0bca12c7131356cf595c136307560ac8000e0d0d5cca6307560ac85c0708060d03cacfc456cf1956c313171908130bb956b3190bb956b3130bb95cb3190bb95cb31308535c0b565b5c08c20b53cab9c5520d510f560f0d0814070c510d0e5b560bc5cec5560d521412c5cec50e0b00561412c5cec50c0d56560d031412c5cec55c0f050a561412c5cec5000d0856c3510f540b141a525ac5cec50e0f080bc30a0b0f050a5614171c525ac5cec5560b5a56c3070e0f050814010b08560b5cc5cec50d5207010f565f14c5c9ca6307560ac8000e0d0d5cca6307560ac85c0708060d03cacfc41c12cfcd171212c912c81acfb3cfc8040d0f08cac519c5cfc9c5cc18b6bc6f676e1ecd060f5018c514c5c5cf53010756010aca0bcf595c0b565b5c08c2c5c553"[c]) - 
                a * b) % 16 + 16) % 16];
            b = d;
            d = b.length;
            a = [];
            for (c = 0; c < d; c += 2)
                a.push(b[c] + b[c + 1]);
            b = "";
            d = a.length;
            for (c = 0; c < d; c++){
                b += String.fromCharCode(parseInt(a[c], 16));
            }
            console.log(typeof b);
            console.log(b);
            b= b.replace(/TRIAL/ig,"");
//            b= b.replace(/alert/ig,"");
            b= b.replace(/2015/ig,"2020");
            console.log(b);
            return b
        }());
        f._generateContent = function() {
            var b, d = "", c = 0;
            a.each(k.wheels, function(e, j) {
                d += '<div class="mbsc-w-p dwc' + ("scroller" != k.mode ? " dwpm" : " dwsc") + (k.showLabel ? "" : " dwhl") + '"><div class="dwwc"' + (k.maxWidth ? "" : ' style="max-width:600px;"') + ">" + (M ? "" : '<table class="dw-tbl" cellpadding="0" cellspacing="0"><tr>');
                a.each(j, function(a, e) {
                    sa[c] = e;
                    b = e.label !== 
                    r ? e.label : a;
                    d += "<" + (M ? "div" : "td") + ' class="dwfl" style="' + (k.fixedWidth ? "width:" + (k.fixedWidth[c] || k.fixedWidth) + "px;" : (k.minWidth ? "min-width:" + (k.minWidth[c] || k.minWidth) + "px;" : "min-width:" + k.width + "px;") + (k.maxWidth ? "max-width:" + (k.maxWidth[c] || k.maxWidth) + "px;" : "")) + '"><div class="dwwl dwwl' + c + (e.multiple ? " dwwms" : "") + '">' + ("scroller" != k.mode ? '<div class="dwb-e dwwb dwwbp ' + (k.btnPlusClass || "") + '" style="height:' + q + "px;line-height:" + q + 'px;"><span>+</span></div><div class="dwb-e dwwb dwwbm ' + (k.btnMinusClass || 
                    "") + '" style="height:' + q + "px;line-height:" + q + 'px;"><span>&ndash;</span></div>' : "") + '<div class="dwl">' + b + '</div><div tabindex="0" aria-live="off" aria-label="' + b + '" role="listbox" class="dwww"><div class="dww" style="height:' + k.rows * q + 'px;"><div class="dw-ul" style="margin-top:' + (e.multiple ? "scroller" == k.mode ? 0 : q : k.rows / 2 * q - q / 2) + 'px;">';
                    d += W(c) + '</div></div><div class="dwwo"></div></div><div class="dwwol"' + (k.selectedLineHeight ? ' style="height:' + q + "px;margin-top:-" + (q / 2 + (k.selectedLineBorder || 0)) + 
                    'px;"' : "") + "></div></div>" + (M ? "</div>" : "</td>");
                    c++
                });
                d += (M ? "" : "</tr></table>") + "</div></div>"
            });
            return d
        };
        f._attachEvents = function(a) {
            a.on("keydown", ".dwwl", v).on("keyup", ".dwwl", Z).on("touchstart mousedown", ".dwwl", ha).on("touchmove", ".dwwl", ka).on("touchend", ".dwwl", Y).on("touchstart mousedown", ".dwwb", ea).on("touchend", ".dwwb", y);
            if (k.mousewheel)
                a.on("wheel mousewheel", ".dwwl", S)
        };
        f._markupReady = function(a) {
            A = a;
            H()
        };
        f._fillValue = function() {
            f._hasValue = !0;
            h(!0, !0, 0, !0)
        };
        f._readValue = function() {
            var a = 
            oa.val() || "";
            "" !== a && (f._hasValue = !0);
            f._tempWheelArray = f._hasValue && f._wheelArray ? f._wheelArray.slice(0) : k.parseValue.call(t, a, f) || [];
            h()
        };
        f._processSettings = function() {
            k = f.settings;
            C = f.trigger;
            q = k.height;
            na = k.multiline;
            f._isLiquid = "liquid" === (k.layout || (/top|bottom/.test(k.display) && 1 == k.wheels.length ? "liquid" : ""));
            k.formatResult && (k.formatValue = k.formatResult);
            1 < na && (k.cssClass = (k.cssClass || "") + " dw-ml");
            "scroller" != k.mode && (k.rows = Math.max(3, k.rows))
        };
        f._selectedValues = {};
        aa || f.init(la)
    };
    D.Scroller.prototype = 
    {_hasDef: !0,_hasTheme: !0,_hasLang: !0,_hasPreset: !0,_class: "scroller",_defaults: a.extend({}, D.Frame.prototype._defaults, {minWidth: 80,height: 40,rows: 3,multiline: 1,delay: 300,readonly: !1,showLabel: !0,confirmOnTap: !0,wheels: [],mode: "scroller",preset: "",speedUnit: 0.0012,timeUnit: 0.08,formatValue: function(a) {
                return a.join(" ")
            },parseValue: function(d, c) {
                var g = [], n = [], p = 0, u, t;
                null !== d && d !== r && (g = (d + "").split(" "));
                a.each(c.settings.wheels, function(d, c) {
                    a.each(c, function(d, c) {
                        t = c.keys || c.values;
                        u = t[0];
                        a.each(t, 
                        function(a, d) {
                            if (g[p] == d)
                                return u = d, !1
                        });
                        n.push(u);
                        p++
                    })
                });
                return n
            }})};
    t.themes.scroller = t.themes.frame
})(jQuery, window, document);
(function(a) {
    var t = a.mobiscroll;
    t.datetime = {defaults: {shortYearCutoff: "+10",monthNames: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthNamesShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),dayNames: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),dayNamesShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),dayNamesMin: "S,M,T,W,T,F,S".split(","),amText: "am",pmText: "pm",getYear: function(a) {
                return a.getFullYear()
            },
            getMonth: function(a) {
                return a.getMonth()
            },getDay: function(a) {
                return a.getDate()
            },getDate: function(a, r, g, t, u, N, p) {
                return new Date(a, r, g, t || 0, u || 0, N || 0, p || 0)
            },getMaxDayOfMonth: function(a, r) {
                return 32 - (new Date(a, r, 32)).getDate()
            },getWeekNumber: function(a) {
                a = new Date(a);
                a.setHours(0, 0, 0);
                a.setDate(a.getDate() + 4 - (a.getDay() || 7));
                var r = new Date(a.getFullYear(), 0, 1);
                return Math.ceil(((a - r) / 864E5 + 1) / 7)
            }},formatDate: function(n, r, g) {
            if (!r)
                return null;
            var g = a.extend({}, t.datetime.defaults, g), D = function(a) {
                for (var d = 
                0; p + 1 < n.length && n.charAt(p + 1) == a; )
                    d++, p++;
                return d
            }, u = function(a, d, c) {
                d = "" + d;
                if (D(a))
                    for (; d.length < c; )
                        d = "0" + d;
                return d
            }, N = function(a, d, c, g) {
                return D(a) ? g[d] : c[d]
            }, p, M, c = "", d = !1;
            for (p = 0; p < n.length; p++)
                if (d)
                    "'" == n.charAt(p) && !D("'") ? d = !1 : c += n.charAt(p);
                else
                    switch (n.charAt(p)) {
                        case "d":
                            c += u("d", g.getDay(r), 2);
                            break;
                        case "D":
                            c += N("D", r.getDay(), g.dayNamesShort, g.dayNames);
                            break;
                        case "o":
                            c += u("o", (r.getTime() - (new Date(r.getFullYear(), 0, 0)).getTime()) / 864E5, 3);
                            break;
                        case "m":
                            c += u("m", g.getMonth(r) + 1, 
                            2);
                            break;
                        case "M":
                            c += N("M", g.getMonth(r), g.monthNamesShort, g.monthNames);
                            break;
                        case "y":
                            M = g.getYear(r);
                            c += D("y") ? M : (10 > M % 100 ? "0" : "") + M % 100;
                            break;
                        case "h":
                            M = r.getHours();
                            c += u("h", 12 < M ? M - 12 : 0 === M ? 12 : M, 2);
                            break;
                        case "H":
                            c += u("H", r.getHours(), 2);
                            break;
                        case "i":
                            c += u("i", r.getMinutes(), 2);
                            break;
                        case "s":
                            c += u("s", r.getSeconds(), 2);
                            break;
                        case "a":
                            c += 11 < r.getHours() ? g.pmText : g.amText;
                            break;
                        case "A":
                            c += 11 < r.getHours() ? g.pmText.toUpperCase() : g.amText.toUpperCase();
                            break;
                        case "'":
                            D("'") ? c += "'" : d = !0;
                            break;
                        default:
                            c += 
                            n.charAt(p)
                    }
            return c
        },parseDate: function(n, r, g) {
            var g = a.extend({}, t.datetime.defaults, g), D = g.defaultValue || new Date;
            if (!n || !r)
                return D;
            if (r.getTime)
                return r;
            var r = "object" == typeof r ? r.toString() : r + "", u = g.shortYearCutoff, N = g.getYear(D), p = g.getMonth(D) + 1, M = g.getDay(D), c = -1, d = D.getHours(), ta = D.getMinutes(), qa = 0, la = -1, aa = !1, ha = function(a) {
                (a = y + 1 < n.length && n.charAt(y + 1) == a) && y++;
                return a
            }, 
            
            ka = function(a) {
                ha(a);
                a = false;
                if (!a)
                    return 0;
                
                ea += a[0].length;
                return parseInt(a[0], 10)
            }, 
            Y = function(a, d, c) {
                a = ha(a) ? c : d;
                for (d = 0; d < a.length; d++)
                    if (r.substr(ea, a[d].length).toLowerCase() == a[d].toLowerCase())
                        return ea += a[d].length, d + 1;
                return 0
            }, ea = 0, y;
            for (y = 0; y < n.length; y++)
                if (aa)
                    "'" == n.charAt(y) && !ha("'") ? aa = !1 : ea++;
                else
                    switch (n.charAt(y)) {
                        case "d":
                            M = ka("d");
                            break;
                        case "D":
                            Y("D", g.dayNamesShort, g.dayNames);
                            break;
                        case "o":
                            c = ka("o");
                            break;
                        case "m":
                            p = ka("m");
                            break;
                        case "M":
                            p = Y("M", g.monthNamesShort, g.monthNames);
                            break;
                        case "y":
                            N = ka("y");
                            break;
                        case "H":
                            d = 
                            ka("H");
                            break;
                        case "h":
                            d = ka("h");
                            break;
                        case "i":
                            ta = ka("i");
                            break;
                        case "s":
                            qa = ka("s");
                            break;
                        case "a":
                            la = Y("a", [g.amText, g.pmText], [g.amText, g.pmText]) - 1;
                            break;
                        case "A":
                            la = Y("A", [g.amText, g.pmText], [g.amText, g.pmText]) - 1;
                            break;
                        case "'":
                            ha("'") ? ea++ : aa = !0;
                            break;
                        default:
                            ea++
                    }
            100 > N && (N += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (N <= ("string" != typeof u ? u : (new Date).getFullYear() % 100 + parseInt(u, 10)) ? 0 : -100));
            if (-1 < c) {
                p = 1;
                M = c;
                do {
                    u = 32 - (new Date(N, p - 1, 32)).getDate();
                    if (M <= u)
                        break;
                    p++;
                    M -= u
                } while (1)
            }
            d = 
            g.getDate(N, p - 1, M, -1 == la ? d : la && 12 > d ? d + 12 : !la && 12 == d ? 0 : d, ta, qa);
            return g.getYear(d) != N || g.getMonth(d) + 1 != p || g.getDay(d) != M ? D : d
        }};
    t.formatDate = t.datetime.formatDate;
    t.parseDate = t.datetime.parseDate
})(jQuery);
(function(a, t, n, r) {
    var g = a.mobiscroll, D = g.presets.scroller, u = g.util, N = u.has3d, p = u.jsPrefix, M = u.testTouch, c = {controls: ["calendar"],firstDay: 0,weekDays: "short",maxMonthWidth: 170,months: 1,preMonths: 1,highlight: !0,swipe: !0,liveSwipe: !0,divergentDayChange: !0,quickNav: !0,navigation: "yearMonth",dateText: "Date",timeText: "Time",calendarText: "Calendar",todayText: "Today",prevMonthText: "Previous Month",nextMonthText: "Next Month",prevYearText: "Previous Year",nextYearText: "Next Year",btnCalPrevClass: "mbsc-ic mbsc-ic-arrow-left6",
        btnCalNextClass: "mbsc-ic mbsc-ic-arrow-right6"};
    D.calbase = function(d) {
        function t(b, d, c) {
            var e, m, j, h, f = {}, l = ja + Oa;
            b && a.each(b, function(a, b) {
                e = b.d || b.start || b;
                m = e + "";
                if (b.start && b.end)
                    for (h = new Date(b.start); h <= b.end; )
                        j = new Date(h.getFullYear(), h.getMonth(), h.getDate()), f[j] = f[j] || [], f[j].push(b), h.setDate(h.getDate() + 1);
                else if (e.getTime)
                    j = new Date(e.getFullYear(), e.getMonth(), e.getDate()), f[j] = f[j] || [], f[j].push(b);
                else if (m.match(/w/i)) {
                    var x = +m.replace("w", ""), g = 0, R = i.getDate(d, c - ja - pa, 1).getDay();
                    1 < i.firstDay - R + 1 && (g = 7);
                    for (A = 0; A < 5 * wa; A++)
                        j = i.getDate(d, c - ja - pa, 7 * A - g - R + 1 + x), f[j] = f[j] || [], f[j].push(b)
                } else if (m = m.split("/"), m[1])
                    11 <= c + l && (j = i.getDate(d + 1, m[0] - 1, m[1]), f[j] = f[j] || [], f[j].push(b)), 1 >= c - l && (j = i.getDate(d - 1, m[0] - 1, m[1]), f[j] = f[j] || [], f[j].push(b)), j = i.getDate(d, m[0] - 1, m[1]), f[j] = f[j] || [], f[j].push(b);
                else
                    for (A = 0; A < wa; A++)
                        j = i.getDate(d, c - ja - pa + A, m[0]), f[j] = f[j] || [], f[j].push(b)
            });
            return f
        }
        function qa(a, b) {
            cb = t(i.invalid, a, b);
            bb = t(i.valid, a, b);
            d.onGenMonth(a, b)
        }
        function la(a, b, d, 
        c, e, j, m) {
            var f = '<div class="dw-cal-h dw-cal-sc-c dw-cal-' + a + "-c " + (i.calendarClass || "") + '"><div class="dw-cal-sc"><div class="dw-cal-sc-p"><div class="dw-cal-sc-tbl"><div class="dw-cal-sc-row">';
            for (h = 1; h <= b; h++)
                f = 12 >= h || h > d ? f + '<div class="dw-cal-sc-m-cell dw-cal-sc-cell dw-cal-sc-empty"><div class="dw-i">&nbsp;</div></div>' : f + ('<div tabindex="0" role="button"' + (j ? ' aria-label="' + j[h - 13] + '"' : "") + ' class="dwb-e dwb-nhl dw-cal-sc-m-cell dw-cal-sc-cell dw-cal-' + a + '-s" data-val=' + (c + h - 13) + '><div class="dw-i dw-cal-sc-tbl"><div class="dw-cal-sc-cell">' + 
                (m ? m[h - 13] : c + h - 13 + e) + "</div></div></div>"), h < b && (0 === h % 12 ? f += '</div></div></div><div class="dw-cal-sc-p" style="' + (xa ? "top" : Fa ? "right" : "left") + ":" + 100 * Math.round(h / 12) + '%"><div class="dw-cal-sc-tbl"><div class="dw-cal-sc-row">' : 0 === h % 3 && (f += '</div><div class="dw-cal-sc-row">'));
            return f + "</div></div></div></div></div>"
        }
        function aa(b, c) {
            var j, e, m, f, h, l, x, g, R, o, k, q, n, p, P = 1, G = 0;
            j = i.getDate(b, c, 1);
            var s = i.getYear(j), sa = i.getMonth(j), t = null === i.defaultValue && !d._hasValue ? null : d.getDate(!0), $ = i.getDate(s, 
            sa, 1).getDay(), w = '<div class="dw-cal-table">', z = '<div class="dw-week-nr-c">';
            1 < i.firstDay - $ + 1 && (G = 7);
            for (p = 0; 42 > p; p++)
                n = p + i.firstDay - G, j = i.getDate(s, sa, n - $ + 1), e = j.getFullYear(), m = j.getMonth(), f = j.getDate(), h = i.getMonth(j), l = i.getDay(j), q = i.getMaxDayOfMonth(e, m), x = e + "-" + m + "-" + f, m = a.extend({valid: j < new Date(Da.getFullYear(), Da.getMonth(), Da.getDate()) || j > Ba ? !1 : cb[j] === r || bb[j] !== r,selected: t && t.getFullYear() === e && t.getMonth() === m && t.getDate() === f}, d.getDayProps(j, t)), g = m.valid, R = m.selected, e = m.cssClass, 
                o = j.getTime() === (new Date).setHours(0, 0, 0, 0), k = h !== sa, db[x] = m, 0 === p % 7 && (w += (p ? "</div>" : "") + '<div class="dw-cal-row' + (i.highlight && t && 0 <= t - j && 6048E5 > t - j ? " dw-cal-week-hl" : "") + '">', Na && ("month" == Na && k && p ? P = 1 == f ? 1 : 2 : "year" == Na && (P = i.getWeekNumber(j)), z += '<div class="dw-week-nr"><div class="dw-week-nr-i">' + P + "</div></div>", P++)), w += '<div role="button" tabindex="-1" aria-label="' + (o ? i.todayText + ", " : "") + i.dayNames[j.getDay()] + ", " + i.monthNames[h] + " " + l + " " + (m.ariaLabel ? ", " + m.ariaLabel : "") + '"' + (k && !Pa ? 
                ' aria-hidden="true"' : "") + (R ? ' aria-selected="true"' : "") + (g ? "" : ' aria-disabled="true"') + ' data-day="' + n % 7 + '" data-full="' + x + '"class="dw-cal-day ' + (o ? " dw-cal-today" : "") + (i.dayClass || "") + (R ? " dw-sel" : "") + (e ? " " + e : "") + (1 == l ? " dw-cal-day-first" : "") + (l == q ? " dw-cal-day-last" : "") + (k ? " dw-cal-day-diff" : "") + (g ? " dw-cal-day-v dwb-e dwb-nhl" : " dw-cal-day-inv") + '"><div class="dw-i ' + (R ? Ha : "") + " " + (i.innerDayClass || "") + '"><div class="dw-cal-day-fg">' + l + d._processItem(a, 0.06) + "</div>" + (m.markup || "") + '<div class="dw-cal-day-frame"></div></div></div>';
            return w + ("</div></div>" + z + "</div>")
        }
        function ha(b, d, c) {
            var e = i.getDate(b, d, 1), l = i.getYear(e), e = i.getMonth(e), g = l + Wa;
            if (Ga) {
                Ia && Ia.removeClass("dw-sel").removeAttr("aria-selected").find(".dw-i").removeClass(Ha);
                Qa && Qa.removeClass("dw-sel").removeAttr("aria-selected").find(".dw-i").removeClass(Ha);
                Ia = a('.dw-cal-year-s[data-val="' + l + '"]', q).addClass("dw-sel").attr("aria-selected", "true");
                Qa = a('.dw-cal-month-s[data-val="' + e + '"]', q).addClass("dw-sel").attr("aria-selected", "true");
                Ia.find(".dw-i").addClass(Ha);
                Qa.find(".dw-i").addClass(Ha);
                ya && ya.scroll(Ia, c);
                a(".dw-cal-month-s", q).removeClass("dwb-d");
                if (l === ma)
                    for (h = 0; h < x; h++)
                        a('.dw-cal-month-s[data-val="' + h + '"]', q).addClass("dwb-d");
                if (l === j)
                    for (h = sa + 1; 12 >= h; h++)
                        a('.dw-cal-month-s[data-val="' + h + '"]', q).addClass("dwb-d")
            }
            1 == f.length && f.attr("aria-label", l).html(g);
            for (h = 0; h < z; ++h)
                e = i.getDate(b, d - pa + h, 1), l = i.getYear(e), e = i.getMonth(e), g = l + Wa, a(na[h]).attr("aria-label", i.monthNames[e] + (Ka ? "" : " " + l)).html((!Ka && oa < ca ? g + " " : "") + L[e] + (!Ka && oa > ca ? " " + g : "")), 
                1 < f.length && a(f[h]).html(g);
            i.getDate(b, d - pa - 1, 1) < m ? Y(a(".dw-cal-prev-m", q)) : ka(a(".dw-cal-prev-m", q));
            i.getDate(b, d + z - pa, 1) > R ? Y(a(".dw-cal-next-m", q)) : ka(a(".dw-cal-next-m", q));
            i.getDate(b, d, 1).getFullYear() <= m.getFullYear() ? Y(a(".dw-cal-prev-y", q)) : ka(a(".dw-cal-prev-y", q));
            i.getDate(b, d, 1).getFullYear() >= R.getFullYear() ? Y(a(".dw-cal-next-y", q)) : ka(a(".dw-cal-next-y", q))
        }
        function ka(a) {
            a.removeClass(eb).find(".dw-cal-btn-txt").removeAttr("aria-disabled")
        }
        function Y(a) {
            a.addClass(eb).find(".dw-cal-btn-txt").attr("aria-disabled", 
            "true")
        }
        function ea(b, c) {
            if (ga.calendar && ("calendar" === za || c)) {
                var j, e, m = i.getDate(U, G, 1), f = Math.abs(12 * (i.getYear(b) - i.getYear(m)) + i.getMonth(b) - i.getMonth(m));
                d.needsSlide && f && (U = i.getYear(b), G = i.getMonth(b), b > m ? (e = f > ja - pa + z - 1, G -= e ? 0 : f - ja, j = "next") : b < m && (e = f > ja + pa, G += e ? 0 : f - ja, j = "prev"), S(U, G, j, Math.min(f, ja), e, !0));
                c || (d.trigger("onDayHighlight", [b]), i.highlight && (a(".dw-sel .dw-i", k).removeClass(Ha), a(".dw-sel", k).removeClass("dw-sel").removeAttr("aria-selected"), a(".dw-cal-week-hl", k).removeClass("dw-cal-week-hl"), 
                (null !== i.defaultValue || d._hasValue) && a('.dw-cal-day[data-full="' + b.getFullYear() + "-" + b.getMonth() + "-" + b.getDate() + '"]', k).addClass("dw-sel").attr("aria-selected", "true").find(".dw-i").addClass(Ha).closest(".dw-cal-row").addClass("dw-cal-week-hl")));
                d.needsSlide = !0
            }
        }
        function y(a, b) {
            qa(a, b);
            for (h = 0; h < wa; h++)
                ra[h].html(aa(a, b - pa - ja + h));
            Z();
            d.needsRefresh = !1
        }
        function v(b, d, c) {
            var e = ja, j = ja;
            if (c) {
                for (; j && i.getDate(b, d + e + z - pa - 1, 1) > R; )
                    j--;
                for (; e && i.getDate(b, d - j - pa, 1) < m; )
                    e--
            }
            a.extend(Q.settings, {contSize: z * 
                C,snap: C,minScroll: J - (Fa ? e : j) * C,maxScroll: J + (Fa ? j : e) * C});
            Q.refresh()
        }
        function Z() {
            Na && $.html(a(".dw-week-nr-c", ra[ja]).html());
            a(".dw-cal-slide-a .dw-cal-day", E).attr("tabindex", 0)
        }
        function S(b, c, j, m, f, l, x) {
            b && Ra.push({y: b,m: c,dir: j,slideNr: m,load: f,active: l,callback: x});
            if (!La) {
                var g = Ra.shift(), b = g.y, c = g.m, j = "next" === g.dir, m = g.slideNr, f = g.load, l = g.active, x = g.callback || Xa, g = i.getDate(b, c, 1), b = i.getYear(g), c = i.getMonth(g);
                La = !0;
                d.changing = !0;
                d.trigger("onMonthChange", [b, c]);
                qa(b, c);
                if (f)
                    for (h = 0; h < 
                    z; h++)
                        ra[j ? wa - z + h : h].html(aa(b, c - pa + h));
                l && Sa.addClass("dw-cal-slide-a");
                setTimeout(function() {
                    d.ariaMessage(i.monthNames[c] + " " + b);
                    ha(b, c, 200);
                    J = j ? J - C * m * Ma : J + C * m * Ma;
                    Q.scroll(J, e ? 200 : 0, function() {
                        setTimeout(function() {
                            var e;
                            if (ra.length) {
                                Sa.removeClass("dw-cal-slide-a").attr("aria-hidden", "true");
                                if (j) {
                                    e = ra.splice(0, m);
                                    for (h = 0; h < m; h++)
                                        ra.push(e[h]), V(ra[ra.length - 1], +ra[ra.length - 2].data("curr") + 100 * Ma)
                                } else {
                                    e = ra.splice(wa - m, m);
                                    for (h = m - 1; 0 <= h; h--)
                                        ra.unshift(e[h]), V(ra[0], +ra[1].data("curr") - 100 * Ma)
                                }
                                for (h = 
                                0; h < m; h++)
                                    ra[j ? wa - m + h : h].html(aa(b, c - pa - ja + h + (j ? wa - m : 0))), f && ra[j ? h : wa - m + h].html(aa(b, c - pa - ja + h + (j ? 0 : wa - m)));
                                for (h = 0; h < z; h++)
                                    ra[ja + h].addClass("dw-cal-slide-a").removeAttr("aria-hidden");
                                v(b, c, !0);
                                La = !1
                            }
                            Ra.length ? setTimeout(function() {
                                S()
                            }, 10) : (U = b, G = c, d.changing = !1, a(".dw-cal-day", E).attr("tabindex", -1), Z(), d.needsRefresh && W(), d.trigger("onMonthLoaded", [b, c]), x())
                        }, e ? 0 : 200)
                    })
                }, 10)
            }
        }
        function s() {
            var c = a(this), j = d.live, e = d.getDate(!0), m = c.attr("data-full"), f = m.split("-"), f = new Date(f[0], f[1], f[2]), 
            e = new Date(f.getFullYear(), f.getMonth(), f.getDate(), e.getHours(), e.getMinutes(), e.getSeconds()), h = c.hasClass("dw-sel");
            if ((Pa || !c.hasClass("dw-cal-day-diff")) && !1 !== d.trigger("onDayChange", [a.extend(db[m], {date: e,cell: this,selected: h})]))
                d.needsSlide = !1, b = !0, d.setDate(e, j, 0.2, !j, !0), i.divergentDayChange && (va = !0, f < i.getDate(U, G - pa, 1) ? fa() : f > i.getDate(U, G - pa + z, 0) && I(), va = !1)
        }
        function V(a, b) {
            a.data("curr", b);
            N ? a[0].style[p + "Transform"] = "translate3d(" + (xa ? "0," + b + "%," : b + "%,0,") + "0)" : a[0].style[xa ? "top" : 
            "left"] = b + "%"
        }
        function W() {
            d.isVisible() && ga.calendar && y(U, G)
        }
        function I() {
            va && i.getDate(U, G + z - pa, 1) <= R && a.mobiscroll.running && S(U, ++G, "next", 1, !1, !0, I)
        }
        function fa() {
            va && i.getDate(U, G - pa - 1, 1) >= m && a.mobiscroll.running && S(U, --G, "prev", 1, !1, !0, fa)
        }
        function da(b) {
            va && i.getDate(U, G, 1) <= i.getDate(i.getYear(R) - 1, i.getMonth(R) - Oa, 1) && a.mobiscroll.running ? S(++U, G, "next", ja, !0, !0, function() {
                da(b)
            }) : va && !b.hasClass("dwb-d") && a.mobiscroll.running && S(i.getYear(R), i.getMonth(R) - Oa, "next", ja, !0, !0)
        }
        function B(b) {
            va && 
            i.getDate(U, G, 1) >= i.getDate(i.getYear(m) + 1, i.getMonth(m) + pa, 1) && a.mobiscroll.running ? S(--U, G, "prev", ja, !0, !0, function() {
                B(b)
            }) : va && !b.hasClass("dwb-d") && a.mobiscroll.running && S(i.getYear(m), i.getMonth(m) + pa, "prev", ja, !0, !0)
        }
        function ia(a, b) {
            a.hasClass("dw-cal-v") || (a.addClass("dw-cal-v" + (b ? "" : " dw-cal-p-in")).removeClass("dw-cal-p-out dw-cal-h"), d.trigger("onSelectShow", []))
        }
        function H(a, b) {
            a.hasClass("dw-cal-v") && a.removeClass("dw-cal-v dw-cal-p-in").addClass("dw-cal-h" + (b ? "" : " dw-cal-p-out"))
        }
        function o(a, 
        b) {
            (b || a).hasClass("dw-cal-v") ? H(a) : ia(a)
        }
        function X() {
            a(this).removeClass("dw-cal-p-out dw-cal-p-in")
        }
        var w, h, A, T, F, q, O, k, E, C, J, b, l, P, $, ba, e, L, Q, K, na, ca, f, oa, ma, j, x, sa, m, R, Da, Ba, Ea, U, G, Ua, Va, bb, cb, Ja, za, La, va, z, wa, Oa, pa, Pa, ya, Ia, Qa, fb = this, Sa = [], ra = [], Ra = [], ga = {}, db = {}, Xa = function() {
        }, jb = a.extend({}, d.settings), i = a.extend(d.settings, c, jb), kb = "full" == i.weekDays ? "" : "min" == i.weekDays ? "Min" : "Short", Na = i.weekCounter, gb = i.layout || (/top|bottom/.test(i.display) ? "liquid" : ""), Ca = "liquid" == gb && "bubble" !== i.display, 
        hb = "modal" == i.display, Fa = i.rtl, Ma = Fa ? -1 : 1, ib = Ca ? null : i.calendarWidth, xa = "vertical" == i.swipeDirection, Ga = i.quickNav, ja = i.preMonths, Ka = "yearMonth" == i.navigation, Ya = i.controls.join(","), Ta = (!0 === i.tabs || !1 !== i.tabs && Ca) && 1 < i.controls.length, Za = !Ta && i.tabs === r && !Ca && 1 < i.controls.length, Wa = i.yearSuffix || "", Ha = i.activeClass || "", $a = "dw-sel " + (i.activeTabClass || ""), ab = i.activeTabInnerClass || "", eb = "dwb-d " + (i.disabledClass || ""), Aa = "", ua = "";
        Ya.match(/calendar/) ? ga.calendar = 1 : Ga = !1;
        Ya.match(/date/) && (ga.date = 
        1);
        Ya.match(/time/) && (ga.time = 1);
        ga.calendar && ga.date && (Ta = !0, Za = !1);
        i.layout = gb;
        i.preset = (ga.date || ga.calendar ? "date" : "") + (ga.time ? "time" : "");
        if ("inline" == i.display)
            a(this).closest('[data-role="page"]').on("pageshow", function() {
                d.position()
            });
        d.changing = !1;
        d.needsRefresh = !1;
        d.needsSlide = !0;
        d.getDayProps = Xa;
        d.onGenMonth = Xa;
        d.prepareObj = t;
        d.refresh = function() {
            d.changing ? d.needsRefresh = true : W()
        };
        d.navigate = function(a, b) {
            var c, j, e = d.isVisible();
            if (b && e)
                ea(a, true);
            else {
                c = i.getYear(a);
                j = i.getMonth(a);
                if (e && (c != U || j != G)) {
                    d.trigger("onMonthChange", [c, j]);
                    ha(c, j);
                    y(c, j)
                }
                U = c;
                G = j
            }
        };
        T = D.datetime.call(this, d);
        ca = i.dateOrder.search(/m/i);
        oa = i.dateOrder.search(/y/i);
        a.extend(T, {ariaMessage: i.calendarText,onMarkupReady: function(b) {
                var c, p, t = "";
                q = b;
                O = i.display == "inline" ? a(this).is("div") ? a(this) : a(this).parent() : d.context;
                Ea = d.getDate(true);
                if (!U) {
                    U = i.getYear(Ea);
                    G = i.getMonth(Ea)
                }
                J = 0;
                P = true;
                La = false;
                L = i.monthNames;
                za = "calendar";
                if (i.minDate) {
                    m = new Date(i.minDate.getFullYear(), i.minDate.getMonth(), 1);
                    Da = 
                    i.minDate
                } else
                    Da = m = new Date(i.startYear, 0, 1);
                if (i.maxDate) {
                    R = new Date(i.maxDate.getFullYear(), i.maxDate.getMonth(), 1);
                    Ba = i.maxDate
                } else
                    Ba = R = new Date(i.endYear, 11, 31, 23, 59, 59);
                b.addClass("dw-calendar" + (N ? "" : " dw-cal-no3d"));
                F = a(".dw", b);
                Ja = a(".dwcc", b);
                ga.date ? ga.date = a(".dwc", q).eq(0) : ga.calendar && a(".dwc", q).eq(0).addClass("dwc-hh");
                if (ga.time)
                    ga.time = a(".dwc", q).eq(1);
                if (ga.calendar) {
                    z = i.months == "auto" ? Math.max(1, Math.min(3, Math.floor((ib || O[0].innerWidth || O.innerWidth()) / 280))) : i.months;
                    wa = z + 
                    2 * ja;
                    Oa = Math.floor(z / 2);
                    pa = Math.round(z / 2) - 1;
                    Pa = i.showDivergentDays === r ? z < 2 : i.showDivergentDays;
                    xa = xa && z < 2;
                    p = '<div class="dw-cal-btnw"><div class="' + (Fa ? "dw-cal-next-m" : "dw-cal-prev-m") + ' dw-cal-prev dw-cal-btn dwb dwb-e"><div role="button" tabindex="0" class="dw-cal-btn-txt ' + (i.btnCalPrevClass || "") + '" aria-label="' + i.prevMonthText + '"></div></div>';
                    for (h = 0; h < z; ++h)
                        p = p + ('<div class="dw-cal-btnw-m" style="width: ' + 100 / z + '%"><span role="button" class="dw-cal-month"></span></div>');
                    p = p + ('<div class="' + 
                    (Fa ? "dw-cal-prev-m" : "dw-cal-next-m") + ' dw-cal-next dw-cal-btn dwb dwb-e"><div role="button" tabindex="0" class="dw-cal-btn-txt ' + (i.btnCalNextClass || "") + '" aria-label="' + i.nextMonthText + '"></div></div></div>');
                    Ka && (t = '<div class="dw-cal-btnw"><div class="' + (Fa ? "dw-cal-next-y" : "dw-cal-prev-y") + ' dw-cal-prev dw-cal-btn dwb dwb-e"><div role="button" tabindex="0" class="dw-cal-btn-txt ' + (i.btnCalPrevClass || "") + '" aria-label="' + i.prevYearText + '"></div></div><span role="button" class="dw-cal-year"></span><div class="' + 
                    (Fa ? "dw-cal-prev-y" : "dw-cal-next-y") + ' dw-cal-next dw-cal-btn dwb dwb-e"><div role="button" tabindex="0" class="dw-cal-btn-txt ' + (i.btnCalNextClass || "") + '" aria-label="' + i.nextYearText + '"></div></div></div>');
                    if (Ga) {
                        ma = i.getYear(m);
                        j = i.getYear(R);
                        x = i.getMonth(m);
                        sa = i.getMonth(R);
                        Va = Math.ceil((j - ma + 1) / 12) + 2;
                        Aa = la("month", 36, 24, 0, "", i.monthNames, i.monthNamesShort);
                        ua = la("year", Va * 12, j - ma + 13, ma, Wa)
                    }
                    l = '<div class="mbsc-w-p dw-cal-c"><div class="dw-cal ' + (z > 1 ? " dw-cal-multi " : "") + (Na ? " dw-weeks " : "") + 
                    (Pa ? "" : " dw-hide-diff ") + (i.calendarClass || "") + '"><div class="dw-cal-header"><div class="dw-cal-btnc ' + (Ka ? "dw-cal-btnc-ym" : "dw-cal-btnc-m") + '">' + (oa < ca || z > 1 ? t + p : p + t) + '</div></div><div class="dw-cal-body"><div class="dw-cal-m-c dw-cal-v"><div class="dw-cal-days-c">';
                    for (A = 0; A < z; ++A) {
                        l = l + ('<div aria-hidden="true" class="dw-cal-days" style="width: ' + 100 / z + '%"><table cellpadding="0" cellspacing="0"><tr>');
                        for (h = 0; h < 7; h++)
                            l = l + ("<th>" + i["dayNames" + kb][(h + i.firstDay) % 7] + "</th>");
                        l = l + "</tr></table></div>"
                    }
                    l = 
                    l + ('</div><div class="dw-cal-anim-c ' + (i.calendarClass || "") + '"><div class="dw-week-nrs-c ' + (i.weekNrClass || "") + '"><div class="dw-week-nrs"></div></div><div class="dw-cal-anim">');
                    for (h = 0; h < z + 2 * ja; h++)
                        l = l + '<div class="dw-cal-slide" aria-hidden="true"></div>';
                    l = l + ("</div></div></div>" + Aa + ua + "</div></div></div>");
                    ga.calendar = a(l)
                }
                a.each(i.controls, function(b, c) {
                    ga[c] = a('<div class="dw-cal-pnl" id="' + (fb.id + "_dw_pnl_" + b) + '"></div>').append(a('<div class="dw-cal-pnl-i"></div>').append(ga[c])).appendTo(Ja)
                });
                c = '<div class="dw-cal-tabs"><ul role="tablist">';
                a.each(i.controls, function(a, b) {
                    ga[b] && (c = c + ('<li role="tab" aria-controls="' + (fb.id + "_dw_pnl_" + a) + '" class="dw-cal-tab ' + (a ? "" : $a) + '" data-control="' + b + '"><a href="#" class="dwb-e dwb-nhl dw-i ' + (!a ? ab : "") + '">' + i[b + "Text"] + "</a></li>"))
                });
                c = c + "</ul></div>";
                Ja.before(c);
                k = a(".dw-cal-anim-c", q);
                E = a(".dw-cal-anim", k);
                $ = a(".dw-week-nrs", k);
                if (ga.calendar) {
                    e = true;
                    Sa = a(".dw-cal-slide", E).each(function(b, c) {
                        ra.push(a(c))
                    });
                    Sa.slice(ja, ja + z).addClass("dw-cal-slide-a").removeAttr("aria-hidden");
                    for (h = 0; h < wa; h++)
                        V(ra[h], 100 * (h - ja) * Ma);
                    y(U, G);
                    Q = new g.classes.ScrollView(k[0], {axis: xa ? "Y" : "X",easing: "",contSize: 0,snap: 1,maxSnapScroll: ja,moveElement: E,mousewheel: i.mousewheel,swipe: i.swipe,liveSwipe: i.liveSwipe,time: 200,lock: true,onScrollStart: function(a, b) {
                            b.settings.scrollLock = d.scrollLock
                        },onScrollEnd: function(a) {
                            (a = Math.round((a - J) / C) * Ma) && S(U, G - a, a > 0 ? "prev" : "next", a > 0 ? a : -a)
                        }})
                }
                na = a(".dw-cal-month", q);
                f = a(".dw-cal-year", q);
                ba = a(".dw-cal-m-c", q);
                if (Ga) {
                    ba.on("webkitAnimationEnd animationend", 
                    X);
                    Aa = a(".dw-cal-month-c", q).on("webkitAnimationEnd animationend", X);
                    ua = a(".dw-cal-year-c", q).on("webkitAnimationEnd animationend", X);
                    a(".dw-cal-sc-p", q);
                    Ua = {axis: xa ? "Y" : "X",contSize: 0,snap: 1,maxSnapScroll: 1,rtl: i.rtl,mousewheel: i.mousewheel,swipe: i.swipe,liveSwipe: i.liveSwipe,time: 200};
                    ya = new g.classes.ScrollView(ua[0], Ua);
                    K = new g.classes.ScrollView(Aa[0], Ua)
                }
                setTimeout(function() {
                    d.tap(k, function(b) {
                        b = a(b.target);
                        if (!La && !Q.scrolled) {
                            b = b.closest(".dw-cal-day", this);
                            b.hasClass("dw-cal-day-v") && s.call(b[0])
                        }
                    });
                    a(".dw-cal-btn", q).on("touchstart mousedown keydown", function(b) {
                        var c = a(this);
                        if (b.type !== "keydown") {
                            b.preventDefault();
                            b = M(b, this)
                        } else
                            b = b.keyCode === 32;
                        if (!va && b && !c.hasClass("dwb-d")) {
                            va = true;
                            c.hasClass("dw-cal-prev-m") ? fa() : c.hasClass("dw-cal-next-m") ? I() : c.hasClass("dw-cal-prev-y") ? B(c) : c.hasClass("dw-cal-next-y") && da(c);
                            a(n).on("mouseup.dwbtn", function() {
                                a(n).off(".dwbtn");
                                va = false
                            })
                        }
                    }).on("touchend touchcancel keyup", function() {
                        va = false
                    });
                    a(".dw-cal-tab", q).on("touchstart click", function(b) {
                        var c = 
                        a(this);
                        if (M(b, this) && a.mobiscroll.running && !c.hasClass("dw-sel")) {
                            za = c.attr("data-control");
                            a(".dw-cal-pnl", q).removeClass("dw-cal-p-in").addClass("dw-cal-pnl-h");
                            a(".dw-cal-tab", q).removeClass($a).removeAttr("aria-selected").find(".dw-i").removeClass(ab);
                            c.addClass($a).attr("aria-selected", "true").find(".dw-i").addClass(ab);
                            ga[za].removeClass("dw-cal-pnl-h").addClass("dw-cal-p-in");
                            if (za === "calendar") {
                                w = d.getDate(true);
                                (w.getFullYear() !== Ea.getFullYear() || w.getMonth() !== Ea.getMonth() || w.getDate() !== 
                                Ea.getDate()) && ea(w)
                            } else {
                                Ea = d.getDate(true);
                                d.setDate(Ea, false, 0, true)
                            }
                            if (Ga) {
                                H(ua, true);
                                H(Aa, true);
                                ia(ba, true)
                            }
                            d.trigger("onTabChange", [za])
                        }
                    });
                    if (Ga) {
                        d.tap(a(".dw-cal-month", q), function() {
                            if (!ua.hasClass("dw-cal-v")) {
                                o(ba);
                                e = ba.hasClass("dw-cal-v")
                            }
                            o(Aa);
                            H(ua)
                        });
                        d.tap(a(".dw-cal-year", q), function() {
                            ua.hasClass("dw-cal-v") || ya.scroll(Ia);
                            if (!Aa.hasClass("dw-cal-v")) {
                                o(ba);
                                e = ba.hasClass("dw-cal-v")
                            }
                            o(ua);
                            H(Aa)
                        });
                        d.tap(a(".dw-cal-month-s", q), function() {
                            !K.scrolled && !a(this).hasClass("dwb-d") && d.navigate(i.getDate(U, 
                            a(this).attr("data-val"), 1))
                        });
                        d.tap(a(".dw-cal-year-s", q), function() {
                            if (!ya.scrolled) {
                                w = i.getDate(a(this).attr("data-val"), G, 1);
                                d.navigate(new Date(u.constrain(w, m, R)))
                            }
                        });
                        d.tap(ua, function() {
                            if (!ya.scrolled) {
                                H(ua);
                                ia(ba);
                                e = true
                            }
                        });
                        d.tap(Aa, function() {
                            if (!K.scrolled) {
                                H(Aa);
                                ia(ba);
                                e = true
                            }
                        })
                    }
                }, 300);
                Ca ? b.addClass("dw-cal-liq") : a(".dw-cal", q).width(ib || 280 * z);
                i.calendarHeight && a(".dw-cal-anim-c", q).height(i.calendarHeight)
            },onShow: function() {
                if (ga.calendar) {
                    ha(U, G);
                    d.trigger("onMonthLoaded", [U, G])
                }
            },
            onPosition: function(b, c, j) {
                var e, m, f, l = 0, g = 0, x = 0;
                if (Ca) {
                    hb && k.height("");
                    Ja.height("");
                    E.width("")
                }
                C && (f = C);
                if (C = Math.round(Math.round(parseInt(k.css(xa ? "height" : "width"))) / z)) {
                    q.removeClass("mbsc-cal-m mbsc-cal-l");
                    C > 1024 ? q.addClass("mbsc-cal-l") : C > 640 && q.addClass("mbsc-cal-m")
                }
                if (Ta && (P || Ca) || Za) {
                    a(".dw-cal-pnl", q).removeClass("dw-cal-pnl-h");
                    a.each(ga, function(a, b) {
                        e = b.outerWidth();
                        l = Math.max(l, e);
                        g = Math.max(g, b.outerHeight());
                        x = x + e
                    });
                    if (Ta || Za && x > (O[0].innerWidth || O.innerWidth())) {
                        m = true;
                        za = a(".dw-cal-tabs .dw-sel", 
                        q).attr("data-control");
                        F.addClass("dw-cal-tabbed")
                    } else {
                        za = "calendar";
                        g = l = "";
                        F.removeClass("dw-cal-tabbed");
                        Ja.css({width: "",height: ""})
                    }
                }
                if (Ca && hb) {
                    d._isFullScreen = true;
                    m && Ja.height(ga.calendar.outerHeight());
                    b = F.outerHeight();
                    j >= b && k.height(j - b + k.outerHeight());
                    g = Math.max(g, ga.calendar.outerHeight())
                }
                if (m) {
                    Ja.css({width: Ca ? "" : l,height: g});
                    C = Math.round(Math.round(parseInt(k.css(xa ? "height" : "width"))) / z)
                }
                if (C) {
                    E[xa ? "height" : "width"](C);
                    if (C !== f) {
                        if (Ka) {
                            L = i.maxMonthWidth > a(".dw-cal-btnw-m", q).width() ? 
                            i.monthNamesShort : i.monthNames;
                            for (h = 0; h < z; ++h)
                                a(na[h]).text(L[i.getMonth(i.getDate(U, G - pa + h, 1))])
                        }
                        if (Ga) {
                            j = ua[xa ? "height" : "width"]();
                            a.extend(ya.settings, {contSize: j,snap: j,minScroll: (2 - Va) * j,maxScroll: -j});
                            a.extend(K.settings, {contSize: j,snap: j,minScroll: -j,maxScroll: -j});
                            ya.refresh();
                            K.refresh();
                            ua.hasClass("dw-cal-v") && ya.scroll(Ia)
                        }
                        if (Ca && !P && f) {
                            j = J / f;
                            J = j * C
                        }
                        v(U, G, !f)
                    }
                } else
                    C = f;
                if (m) {
                    a(".dw-cal-pnl", q).addClass("dw-cal-pnl-h");
                    ga[za].removeClass("dw-cal-pnl-h")
                }
                d.trigger("onCalResize", []);
                P = false
            },
            onHide: function() {
                Ra = [];
                ra = [];
                G = U = za = null;
                La = true;
                C = 0;
                Q && Q.destroy();
                if (Ga && ya && K) {
                    ya.destroy();
                    K.destroy()
                }
            },onValidated: function() {
                var a, c, j;
                c = d.getDate(true);
                if (b)
                    a = "calendar";
                else
                    for (j in d.order)
                        j && d.order[j] === h && (a = /mdy/.test(j) ? "date" : "time");
                d.trigger("onSetDate", [{date: c,control: a}]);
                ea(c);
                b = false
            }});
        return T
    }
})(jQuery, window, document);
(function(a, t) {
    var n = a.mobiscroll, r = n.classes, g = n.util, D = g.constrain, u = g.jsPrefix, N = g.prefix, p = g.has3d, M = g.getCoord, c = g.getPosition, d = g.testTouch, ta = g.isNumeric, qa = g.isString, la = "webkitTransitionEnd transitionend", aa = window.requestAnimationFrame || function(a) {
        a()
    }, ha = window.cancelAnimationFrame || function() {
    };
    r.ScrollView = function(g, n, ea) {
        function y(b) {
            if ((!x.lock || !E) && d(b, this) && !k && a.mobiscroll.running) {
                "mousedown" == b.type && b.preventDefault();
                I && I.removeClass("mbsc-btn-a");
                A = !1;
                I = a(b.target).closest(".mbsc-btn", 
                this);
                I.length && !I.hasClass("mbsc-btn-d") && (A = !0, fa = setTimeout(function() {
                    I.addClass("mbsc-btn-a")
                }, 100));
                k = !0;
                O = !1;
                f.scrolled = E;
                e = M(b, "X");
                L = M(b, "Y");
                w = e;
                H = ia = B = 0;
                ba = new Date;
                $ = +c(K, ca) || 0;
                W($, 1);
                if ("mousedown" === b.type)
                    a(document).on("mousemove", v).on("mouseup", S);
                na("onScrollStart", [oa])
            }
        }
        function v(a) {
            if (k) {
                w = M(a, "X");
                h = M(a, "Y");
                B = w - e;
                ia = h - L;
                H = ca ? ia : B;
                if (A && (5 < Math.abs(ia) || 5 < Math.abs(B)))
                    clearTimeout(fa), I.removeClass("mbsc-btn-a"), A = !1;
                !O && 5 < Math.abs(H) && (f.scrolled = !0, x.liveSwipe && !J && (J = !0, 
                C = aa(Z)));
                ca || x.scrollLock ? a.preventDefault() : f.scrolled ? a.preventDefault() : 7 < Math.abs(ia) && (O = !0, f.scrolled = !0, sa.trigger("touchend"))
            }
        }
        function Z() {
            F && (H = D(H, -l * F, l * F));
            W(D($ + H, q - X, T + X));
            J = !1
        }
        function S(b) {
            if (k) {
                var c;
                c = new Date - ba;
                ha(C);
                J = !1;
                !O && f.scrolled && (x.momentum && p && 300 > c && (c = H / c, H = Math.max(Math.abs(H), c * c / x.speedUnit) * (0 > H ? -1 : 1)), V(H));
                A && (clearTimeout(fa), I.addClass("mbsc-btn-a"), setTimeout(function() {
                    I.removeClass("mbsc-btn-a")
                }, 100), !O && !f.scrolled && na("onBtnTap", [I]));
                "mouseup" == b.type && 
                a(document).off("mousemove", v).off("mouseup", S);
                k = !1
            }
        }
        function s(c) {
            c = c.originalEvent || c;
            if ((H = ca ? c.deltaY || c.wheelDelta || c.detail : c.deltaX) && a.mobiscroll.running)
                c.preventDefault(), H = 0 > H ? 20 : -20, $ = oa, J || (J = !0, C = aa(Z)), clearTimeout(b), b = setTimeout(function() {
                    ha(C);
                    J = false;
                    V(H)
                }, 200)
        }
        function V(a) {
            var b;
            F && (a = D(a, -l * F, l * F));
            ma = Math.round(($ + a) / l);
            b = D(ma * l, q, T);
            if (P) {
                if (0 > a)
                    for (a = P.length - 1; 0 <= a; a--) {
                        if (Math.abs(b) + da >= P[a].breakpoint) {
                            ma = a;
                            j = 2;
                            b = P[a].snap2;
                            break
                        }
                    }
                else if (0 <= a)
                    for (a = 0; a < P.length; a++)
                        if (Math.abs(b) <= 
                        P[a].breakpoint) {
                            ma = a;
                            j = 1;
                            b = P[a].snap1;
                            break
                        }
                b = D(b, q, T)
            }
            W(b, x.time || (oa < q || oa > T ? 200 : Math.max(200, Math.abs(b - oa) * x.timeUnit)), function() {
                f.scrolled = !1;
                na("onScrollEnd", [oa])
            })
        }
        function W(a, b, c) {
            var d = function() {
                E = !1;
                c && c()
            };
            E = !0;
            if (p)
                if (Q[u + "Transition"] = b ? N + "transform " + Math.round(b) + "ms " + x.easing : "", Q[u + "Transform"] = "translate3d(" + (ca ? "0," + a + "px," : a + "px,0,") + "0)", oa == a || !b)
                    d();
                else {
                    if (b)
                        K.on(la, function(a) {
                            a.target === K[0] && (K.off(la), Q[u + "Transition"] = "", d())
                        })
                }
            else
                setTimeout(d, b || 0), Q[o] = a + "px";
            oa = a
        }
        var I, fa, da, B, ia, H, o, X, w, h, A, T, F, q, O, k, E, C, J, b, l, P, $, ba, e, L, Q, K, na, ca, f = this, oa = 0, ma = 0, j = 1, x = n, sa = a(g);
        r.Base.call(this, g, n, !0);
        f.scrolled = !1;
        f.scroll = function(b, c, d) {
            b = ta(b) ? Math.round(b / l) * l : Math.ceil((a(b, g).length ? Math.round(K.offset()[o] - a(b, g).offset()[o]) : oa) / l) * l;
            ma = Math.round(b / l);
            W(D(b, q, T), c, d)
        };
        f.refresh = function() {
            var a;
            da = x.contSize === t ? ca ? sa.height() : sa.width() : x.contSize;
            q = x.minScroll === t ? ca ? da - K.height() : da - K.width() : x.minScroll;
            T = x.maxScroll === t ? 0 : x.maxScroll;
            !ca && x.rtl && (a = 
            T, T = -q, q = -a);
            qa(x.snap) && (P = [], K.find(x.snap).each(function() {
                var a = ca ? this.offsetTop : this.offsetLeft, b = ca ? this.offsetHeight : this.offsetWidth;
                P.push({breakpoint: a + b / 2,snap1: -a,snap2: da - a - b})
            }));
            l = ta(x.snap) ? x.snap : 1;
            F = x.snap ? x.maxSnapScroll : 0;
            X = x.elastic ? ta(x.snap) ? l : ta(x.elastic) ? x.elastic : 0 : 0;
            f.scroll(x.snap ? P ? P[ma]["snap" + j] : ma * l : oa)
        };
        f.init = function(a) {
            f._init(a);
            o = (ca = "Y" == x.axis) ? "top" : "left";
            K = x.moveElement || sa.children().eq(0);
            Q = K[0].style;
            f.refresh();
            if (x.swipe)
                sa.on("touchstart mousedown", 
                y).on("touchmove", v).on("touchend touchcancel", S);
            if (x.mousewheel)
                sa.on("wheel mousewheel", s);
            g.addEventListener && g.addEventListener("click", function(a) {
                f.scrolled && (a.stopPropagation(), a.preventDefault())
            }, !0)
        };
        f.destroy = function() {
            sa.off("touchstart mousedown", y).off("touchmove", v).off("touchend touchcancel", S).off("wheel mousewheel", s);
            f._destroy()
        };
        x = f.settings;
        na = f.trigger;
        ea || f.init(n)
    };
    r.ScrollView.prototype = {_class: "scrollview",_defaults: {speedUnit: 0.0022,timeUnit: 0.8,axis: "Y",easing: "ease-out",
            swipe: !0,liveSwipe: !0,momentum: !0,elastic: !0}};
    n.presetShort("scrollview", "ScrollView", !1)
})(jQuery);
(function(a, t) {
    var n = a.mobiscroll, r = n.datetime, g = new Date, D = {startYear: g.getFullYear() - 100,endYear: g.getFullYear() + 1,separator: " ",dateFormat: "mm/dd/yy",dateOrder: "mmddy",timeWheels: "hhiiA",timeFormat: "hh:ii A",dayText: "Day",monthText: "Month",yearText: "Year",hourText: "Hours",minuteText: "Minutes",ampmText: "&nbsp;",secText: "Seconds",nowText: "Now"}, u = function(g) {
        function p(a, b, c) {
            return A[b] !== t ? +a[A[b]] : T[b] !== t ? T[b] : c !== t ? c : F[b](P)
        }
        function u(a, b, c, d) {
            a.push({values: c,keys: b,label: d})
        }
        function c(a, 
        b, c, d) {
            return Math.min(d, Math.floor(a / b) * b + c)
        }
        function d(a) {
            if (null === a)
                return a;
            var b = p(a, "y"), c = p(a, "m"), d = Math.min(p(a, "d", 1), o.getMaxDayOfMonth(b, c)), e = p(a, "h", 0);
            return o.getDate(b, c, d, p(a, "a", 0) ? e + 12 : e, p(a, "i", 0), p(a, "s", 0), p(a, "u", 0))
        }
        function ta(a, b) {
            var c, e, f = !1, g = !1, h = 0, l = 0;
            L = d(Y(L));
            Q = d(Y(Q));
            if (qa(a))
                return a;
            a < L && (a = L);
            a > Q && (a = Q);
            e = c = a;
            if (2 !== b)
                for (f = qa(c); !f && c < Q; )
                    c = new Date(c.getTime() + 864E5), f = qa(c), h++;
            if (1 !== b)
                for (g = qa(e); !g && e > L; )
                    e = new Date(e.getTime() - 864E5), g = qa(e), l++;
            return 1 === 
            b && f ? c : 2 === b && g ? e : l <= h && g ? e : c
        }
        function qa(a) {
            return a < L || a > Q ? !1 : la(a, O) ? !0 : la(a, q) ? !1 : !0
        }
        function la(a, b) {
            var c, d, e;
            if (b)
                for (d = 0; d < b.length; d++)
                    if (c = b[d], e = c + "", !c.start)
                        if (c.getTime) {
                            if (a.getFullYear() == c.getFullYear() && a.getMonth() == c.getMonth() && a.getDate() == c.getDate())
                                return !0
                        } else if (e.match(/w/i)) {
                            if (e = +e.replace("w", ""), e == a.getDay())
                                return !0
                        } else if (e = e.split("/"), e[1]) {
                            if (e[0] - 1 == a.getMonth() && e[1] == a.getDate())
                                return !0
                        } else if (e[0] == a.getDate())
                            return !0;
            return !1
        }
        function aa(a, b, c, d, e, f, 
        g) {
            var h, l, k;
            if (a)
                for (h = 0; h < a.length; h++)
                    if (l = a[h], k = l + "", !l.start)
                        if (l.getTime)
                            o.getYear(l) == b && o.getMonth(l) == c && (f[o.getDay(l) - 1] = g);
                        else if (k.match(/w/i)) {
                            k = +k.replace("w", "");
                            for (V = k - d; V < e; V += 7)
                                0 <= V && (f[V] = g)
                        } else
                            k = k.split("/"), k[1] ? k[0] - 1 == c && (f[k[1] - 1] = g) : f[k[0] - 1] = g
        }
        function ha(d, f, g, l, h, k, q, p, n) {
            var r, P, u, s, v, y, B, A, C, z, L, K, D, E, F, Q, I, M, O = {}, J = {h: $,i: ba,s: e,a: 1}, ca = o.getDate(h, k, q), N = ["a", "h", "i", "s"];
            d && (a.each(d, function(a, b) {
                if (b.start && (b.apply = !1, r = b.d, P = r + "", u = P.split("/"), r && (r.getTime && 
                h == o.getYear(r) && k == o.getMonth(r) && q == o.getDay(r) || !P.match(/w/i) && (u[1] && q == u[1] && k == u[0] - 1 || !u[1] && q == u[0]) || P.match(/w/i) && ca.getDay() == +P.replace("w", ""))))
                    b.apply = !0, O[ca] = !0
            }), a.each(d, function(d, e) {
                L = E = D = 0;
                K = t;
                B = y = !0;
                F = !1;
                if (e.start && (e.apply || !e.d && !O[ca])) {
                    s = e.start.split(":");
                    v = e.end.split(":");
                    for (z = 0; 3 > z; z++)
                        s[z] === t && (s[z] = 0), v[z] === t && (v[z] = 59), s[z] = +s[z], v[z] = +v[z];
                    s.unshift(11 < s[0] ? 1 : 0);
                    v.unshift(11 < v[0] ? 1 : 0);
                    b && (12 <= s[1] && (s[1] -= 12), 12 <= v[1] && (v[1] -= 12));
                    for (z = 0; z < f; z++)
                        if (w[z] !== 
                        t) {
                            A = c(s[z], J[N[z]], ia[N[z]], H[N[z]]);
                            C = c(v[z], J[N[z]], ia[N[z]], H[N[z]]);
                            M = I = Q = 0;
                            b && 1 == z && (Q = s[0] ? 12 : 0, I = v[0] ? 12 : 0, M = w[0] ? 12 : 0);
                            y || (A = 0);
                            B || (C = H[N[z]]);
                            if ((y || B) && A + Q < w[z] + M && w[z] + M < C + I)
                                F = !0;
                            w[z] != A && (y = !1);
                            w[z] != C && (B = !1)
                        }
                    if (!n)
                        for (z = f + 1; 4 > z; z++)
                            0 < s[z] && (D = J[g]), v[z] < H[N[z]] && (E = J[g]);
                    F || (A = c(s[f], J[g], ia[g], H[g]) + D, C = c(v[f], J[g], ia[g], H[g]) - E, y && (L = 0 > A ? 0 : A > H[g] ? a(".dw-li", p).length : ka(p, A) + 0), B && (K = 0 > C ? 0 : C > H[g] ? a(".dw-li", p).length : ka(p, C) + 1));
                    if (y || B || F)
                        n ? a(".dw-li", p).slice(L, K).addClass("dw-v") : 
                        a(".dw-li", p).slice(L, K).removeClass("dw-v")
                }
            }))
        }
        function ka(b, c) {
            return a(".dw-li", b).index(a('.dw-li[data-val="' + c + '"]', b))
        }
        function Y(b, c) {
            var d = [];
            if (null === b || b === t)
                return b;
            a.each("y,m,d,a,h,i,s,u".split(","), function(a, e) {
                A[e] !== t && (d[A[e]] = F[e](b));
                c && (T[e] = F[e](b))
            });
            return d
        }
        function ea(a) {
            var b, c, d, e = [];
            if (a) {
                for (b = 0; b < a.length; b++)
                    if (c = a[b], c.start && c.start.getTime)
                        for (d = new Date(c.start); d <= c.end; )
                            e.push(new Date(d.getFullYear(), d.getMonth(), d.getDate())), d.setDate(d.getDate() + 1);
                    else
                        e.push(c);
                return e
            }
            return a
        }
        var y = a(this), v = {}, Z;
        if (y.is("input")) {
            switch (y.attr("type")) {
                case "date":
                    Z = "yy-mm-dd";
                    break;
                case "datetime":
                    Z = "yy-mm-ddTHH:ii:ssZ";
                    break;
                case "datetime-local":
                    Z = "yy-mm-ddTHH:ii:ss";
                    break;
                case "month":
                    Z = "yy-mm";
                    v.dateOrder = "mmyy";
                    break;
                case "time":
                    Z = "HH:ii:ss"
            }
            var S = y.attr("min"), y = y.attr("max");
            S && (v.minDate = r.parseDate(Z, S));
            y && (v.maxDate = r.parseDate(Z, y))
        }
        var s, V, W, I, fa, da, B, ia, H, S = a.extend({}, g.settings), o = a.extend(g.settings, n.datetime.defaults, D, v, S), X = 0, w = [], v = [], h = [], A = {}, 
        T = {}, F = {y: function(a) {
                return o.getYear(a)
            },m: function(a) {
                return o.getMonth(a)
            },d: function(a) {
                return o.getDay(a)
            },h: function(a) {
                a = a.getHours();
                a = b && 12 <= a ? a - 12 : a;
                return c(a, $, K, f)
            },i: function(a) {
                return c(a.getMinutes(), ba, na, oa)
            },s: function(a) {
                return c(a.getSeconds(), e, ca, ma)
            },u: function(a) {
                return a.getMilliseconds()
            },a: function(a) {
                return J && 11 < a.getHours() ? 1 : 0
            }}, q = o.invalid, O = o.valid, S = o.preset, k = o.dateOrder, E = o.timeWheels, C = k.match(/D/), J = E.match(/a/i), b = E.match(/h/), l = "datetime" == S ? o.dateFormat + 
        o.separator + o.timeFormat : "time" == S ? o.timeFormat : o.dateFormat, P = new Date, y = o.steps || {}, $ = y.hour || o.stepHour || 1, ba = y.minute || o.stepMinute || 1, e = y.second || o.stepSecond || 1, y = y.zeroBased, L = o.minDate || new Date(o.startYear, 0, 1), Q = o.maxDate || new Date(o.endYear, 11, 31, 23, 59, 59), K = y ? 0 : L.getHours() % $, na = y ? 0 : L.getMinutes() % ba, ca = y ? 0 : L.getSeconds() % e, f = Math.floor(((b ? 11 : 23) - K) / $) * $ + K, oa = Math.floor((59 - na) / ba) * ba + na, ma = Math.floor((59 - na) / ba) * ba + na;
        Z = Z || l;
        if (S.match(/date/i)) {
            a.each(["y", "m", "d"], function(a, b) {
                s = 
                k.search(RegExp(b, "i"));
                -1 < s && h.push({o: s,v: b})
            });
            h.sort(function(a, b) {
                return a.o > b.o ? 1 : -1
            });
            a.each(h, function(a, b) {
                A[b.v] = a
            });
            y = [];
            for (V = 0; 3 > V; V++)
                if (V == A.y) {
                    X++;
                    I = [];
                    W = [];
                    fa = o.getYear(L);
                    da = o.getYear(Q);
                    for (s = fa; s <= da; s++)
                        W.push(s), I.push((k.match(/yy/i) ? s : (s + "").substr(2, 2)) + (o.yearSuffix || ""));
                    u(y, W, I, o.yearText)
                } else if (V == A.m) {
                    X++;
                    I = [];
                    W = [];
                    for (s = 0; 12 > s; s++)
                        fa = k.replace(/[dy]/gi, "").replace(/mm/, (9 > s ? "0" + (s + 1) : s + 1) + (o.monthSuffix || "")).replace(/m/, s + 1 + (o.monthSuffix || "")), W.push(s), I.push(fa.match(/MM/) ? 
                        fa.replace(/MM/, '<span class="dw-mon">' + o.monthNames[s] + "</span>") : fa.replace(/M/, '<span class="dw-mon">' + o.monthNamesShort[s] + "</span>"));
                    u(y, W, I, o.monthText)
                } else if (V == A.d) {
                    X++;
                    I = [];
                    W = [];
                    for (s = 1; 32 > s; s++)
                        W.push(s), I.push((k.match(/dd/i) && 10 > s ? "0" + s : s) + (o.daySuffix || ""));
                    u(y, W, I, o.dayText)
                }
            v.push(y)
        }
        if (S.match(/time/i)) {
            B = !0;
            h = [];
            a.each(["h", "i", "s", "a"], function(a, b) {
                a = E.search(RegExp(b, "i"));
                -1 < a && h.push({o: a,v: b})
            });
            h.sort(function(a, b) {
                return a.o > b.o ? 1 : -1
            });
            a.each(h, function(a, b) {
                A[b.v] = X + a
            });
            y = [];
            for (V = X; V < X + 4; V++)
                if (V == A.h) {
                    X++;
                    I = [];
                    W = [];
                    for (s = K; s < (b ? 12 : 24); s += $)
                        W.push(s), I.push(b && 0 === s ? 12 : E.match(/hh/i) && 10 > s ? "0" + s : s);
                    u(y, W, I, o.hourText)
                } else if (V == A.i) {
                    X++;
                    I = [];
                    W = [];
                    for (s = na; 60 > s; s += ba)
                        W.push(s), I.push(E.match(/ii/) && 10 > s ? "0" + s : s);
                    u(y, W, I, o.minuteText)
                } else if (V == A.s) {
                    X++;
                    I = [];
                    W = [];
                    for (s = ca; 60 > s; s += e)
                        W.push(s), I.push(E.match(/ss/) && 10 > s ? "0" + s : s);
                    u(y, W, I, o.secText)
                } else
                    V == A.a && (X++, S = E.match(/A/), u(y, [0, 1], S ? [o.amText.toUpperCase(), o.pmText.toUpperCase()] : [o.amText, o.pmText], o.ampmText));
            v.push(y)
        }
        g.getVal = function(a) {
            return g._hasValue || a ? d(g.getArrayVal(a)) : null
        };
        g.setDate = function(a, b, c, d, e) {
            g.setArrayVal(Y(a), b, e, d, c)
        };
        g.getDate = g.getVal;
        g.format = l;
        g.order = A;
        g.handlers.now = function() {
            g.setDate(new Date, !1, 0.3, !0, !0)
        };
        g.buttons.now = {text: o.nowText,handler: "now"};
        q = ea(q);
        O = ea(O);
        ia = {y: L.getFullYear(),m: 0,d: 1,h: K,i: na,s: ca,a: 0};
        H = {y: Q.getFullYear(),m: 11,d: 31,h: f,i: oa,s: ma,a: 1};
        return {wheels: v,headerText: o.headerText ? function() {
                return r.formatDate(l, d(g.getArrayVal(!0)), o)
            } : !1,formatValue: function(a) {
                return r.formatDate(Z, 
                d(a), o)
            },parseValue: function(a) {
                a || (T = {});
                return Y(a ? r.parseDate(Z, a, o) : o.defaultValue || new Date, !!a && !!a.getTime)
            },validate: function(b, c, e, f) {
                var c = ta(d(g.getArrayVal(!0)), f), h = Y(c), l = p(h, "y"), n = p(h, "m"), s = !0, r = !0;
                a.each("y,m,d,a,h,i,s".split(","), function(c, d) {
                    if (A[d] !== t) {
                        var e = ia[d], f = H[d], g = 31, m = p(h, d), P = a(".dw-ul", b).eq(A[d]);
                        if (d == "d") {
                            f = g = o.getMaxDayOfMonth(l, n);
                            C && a(".dw-li", P).each(function() {
                                var b = a(this), c = b.data("val"), d = o.getDate(l, n, c).getDay(), c = k.replace(/[my]/gi, "").replace(/dd/, 
                                (c < 10 ? "0" + c : c) + (o.daySuffix || "")).replace(/d/, c + (o.daySuffix || ""));
                                a(".dw-i", b).html(c.match(/DD/) ? c.replace(/DD/, '<span class="dw-day">' + o.dayNames[d] + "</span>") : c.replace(/D/, '<span class="dw-day">' + o.dayNamesShort[d] + "</span>"))
                            })
                        }
                        s && L && (e = F[d](L));
                        r && Q && (f = F[d](Q));
                        if (d != "y") {
                            var u = ka(P, e), v = ka(P, f);
                            a(".dw-li", P).removeClass("dw-v").slice(u, v + 1).addClass("dw-v");
                            d == "d" && a(".dw-li", P).removeClass("dw-h").slice(g).addClass("dw-h")
                        }
                        m < e && (m = e);
                        m > f && (m = f);
                        s && (s = m == e);
                        r && (r = m == f);
                        if (d == "d") {
                            e = o.getDate(l, 
                            n, 1).getDay();
                            f = {};
                            aa(q, l, n, e, g, f, 1);
                            aa(O, l, n, e, g, f, 0);
                            a.each(f, function(b, c) {
                                c && a(".dw-li", P).eq(b).removeClass("dw-v")
                            })
                        }
                    }
                });
                B && a.each(["a", "h", "i", "s"], function(c, d) {
                    var e = p(h, d), k = p(h, "d"), o = a(".dw-ul", b).eq(A[d]);
                    A[d] !== t && (ha(q, c, d, h, l, n, k, o, 0), ha(O, c, d, h, l, n, k, o, 1), w[c] = +g.getValidCell(e, o, f).val)
                });
                g._tempWheelArray = h
            }}
    };
    a.each(["date", "time", "datetime"], function(a, g) {
        n.presets.scroller[g] = u
    })
})(jQuery);
(function(a, t, n, r) {
    var g = a.mobiscroll, D = a.extend, u = g.util, N = g.datetime, p = g.presets.scroller, M = {labelsShort: "Yrs,Mths,Days,Hrs,Mins,Secs".split(","),fromText: "Start",toText: "End",eventText: "event",eventsText: "events"};
    g.presetShort("calendar");
    p.calendar = function(c) {
        function d(b) {
            if (b) {
                if (X[b])
                    return X[b];
                var c = a('<div style="background-color:' + b + ';"></div>').appendTo("body"), d = (t.getComputedStyle ? getComputedStyle(c[0]) : c[0].style).backgroundColor.replace(/rgb|rgba|\(|\)|\s/g, "").split(","), d = 130 < 
                0.299 * d[0] + 0.587 * d[1] + 0.114 * d[2] ? "#000" : "#fff";
                c.remove();
                return X[b] = d
            }
        }
        function n(a) {
            return a.sort(function(a, b) {
                var c = a.d || a.start, d = b.d || b.start, c = !c.getTime ? 0 : a.start && a.end && a.start.toDateString() !== a.end.toDateString() ? 1 : c.getTime(), d = !d.getTime ? 0 : b.start && b.end && b.start.toDateString() !== b.end.toDateString() ? 1 : d.getTime();
                return c - d
            })
        }
        function qa(b) {
            var c;
            c = a(".dw-cal-c", y).outerHeight();
            var d = b.outerHeight(), g = b.outerWidth(), h = b.offset().top - a(".dw-cal-c", y).offset().top, e = 2 > b.closest(".dw-cal-row").index();
            c = v.addClass("dw-cal-events-t").css({top: e ? h + d : "0",bottom: e ? "0" : c - h}).addClass("dw-cal-events-v").height();
            v.css(e ? "bottom" : "top", "auto").removeClass("dw-cal-events-t");
            V.css("max-height", c);
            s.refresh();
            s.scroll(0);
            e ? v.addClass("dw-cal-events-b") : v.removeClass("dw-cal-events-b");
            a(".dw-cal-events-arr", v).css("left", b.offset().left - v.offset().left + g / 2)
        }
        function la(b, l) {
            var k = S[b];
            if (k) {
                var o, q, e, p, r, t = '<ul class="dw-cal-event-list">';
                Z = l;
                l.addClass(h).find(".dw-i").addClass(T);
                l.hasClass(A) && l.attr("data-hl", 
                "true").removeClass(A);
                n(k);
                a.each(k, function(a, b) {
                    p = b.d || b.start;
                    r = b.start && b.end && b.start.toDateString() !== b.end.toDateString();
                    e = b.color;
                    d(e);
                    q = o = "";
                    p.getTime && (o = g.datetime.formatDate((r ? "MM d yy " : "") + w.timeFormat, p));
                    b.end && (q = g.datetime.formatDate((r ? "MM d yy " : "") + w.timeFormat, b.end));
                    var c = t, h = '<li role="button" aria-label="' + b.text + (o ? ", " + w.fromText + " " + o : "") + (q ? ", " + w.toText + " " + q : "") + '" class="dw-cal-event"><div class="dw-cal-event-color" style="' + (e ? "background:" + e + ";" : "") + '"></div>' + 
                    (p.getTime && !r ? '<div class="dw-cal-event-time">' + g.datetime.formatDate(w.timeFormat, p) + "</div>" : "") + b.text, l;
                    if (b.start && b.end) {
                        l = w.labelsShort;
                        var j = Math.abs(b.end - b.start) / 1E3, k = j / 60, n = k / 60, m = n / 24, s = m / 365;
                        l = '<div class="dw-cal-event-dur">' + (45 > j && Math.round(j) + " " + l[5].toLowerCase() || 45 > k && Math.round(k) + " " + l[4].toLowerCase() || 24 > n && Math.round(n) + " " + l[3].toLowerCase() || 30 > m && Math.round(m) + " " + l[2].toLowerCase() || 365 > m && Math.round(m / 30) + " " + l[1].toLowerCase() || Math.round(s) + " " + l[0].toLowerCase()) + 
                        "</div>"
                    } else
                        l = "";
                    t = c + (h + l + "</li>")
                });
                t += "</ul>";
                W.html(t);
                c.trigger("onEventBubbleShow", [Z, v]);
                qa(Z);
                c.tap(a(".dw-cal-event", W), function(d) {
                    s.scrolled || c.trigger("onEventSelect", [d, k[a(this).index()], b])
                });
                I = !0
            }
        }
        function aa() {
            v && v.removeClass("dw-cal-events-v");
            Z && (Z.removeClass(h).find(".dw-i").removeClass(T), Z.attr("data-hl") && Z.removeAttr("data-hl").addClass(A));
            I = !1
        }
        function ha(a) {
            return new Date(a.getFullYear(), a.getMonth(), a.getDate())
        }
        function ka(a) {
            E = {};
            if (a && a.length)
                for (da = 0; da < a.length; da++)
                    E[ha(a[da])] = 
                    a[da]
        }
        function Y() {
            C && aa();
            c.refresh()
        }
        var ea, y, v, Z, S, s, V, W, I, fa, da, B, ia, H, o, X = {};
        H = D({}, c.settings);
        var w = D(c.settings, M, H), h = "dw-sel dw-cal-day-ev", A = "dw-cal-day-hl", T = w.activeClass || "", F = w.multiSelect || "week" == w.selectType, q = w.markedDisplay, O = !0 === w.events || !0 === w.markedText, k = 0, E = {}, C = a.isArray(w.events), J = C ? D(!0, [], w.events) : [];
        H = p.calbase.call(this, c);
        ea = D({}, H);
        fa = w.firstSelectDay === r ? w.firstDay : w.firstSelectDay;
        if (w.selectedValues)
            for (da = 0; da < w.selectedValues.length; da++)
                E[ha(w.selectedValues[da])] = 
                w.selectedValues[da];
        C && a.each(J, function(a, c) {
            c._id === r && (c._id = k++)
        });
        c.onGenMonth = function(a, d) {
            S = c.prepareObj(J, a, d);
            B = c.prepareObj(w.marked, a, d)
        };
        c.getDayProps = function(b) {
            for (var c = F ? E[b] !== r : C ? b.getTime() === (new Date).setHours(0, 0, 0, 0) : r, g = B[b] ? B[b][0] : !1, h = S[b] ? S[b][0] : !1, k = g || h, g = g.text || (h ? S[b].length + " " + (1 < S[b].length ? w.eventsText : w.eventText) : 0), h = B[b] || S[b] || [], e = k.color, o = O && g ? d(e) : "", n = "", p = '<div class="dw-cal-day-m"' + (e ? ' style="background-color:' + e + ";border-color:" + e + " " + e + ' transparent transparent"' : 
            "") + "></div>", b = 0; b < h.length; b++)
                h[b].icon && (n += '<span class="mbsc-ic mbsc-ic-' + h[b].icon + '"' + (h[b].text ? "" : h[b].color ? ' style="color:' + h[b].color + ';"' : "") + "></span>\n");
            if ("bottom" == q) {
                p = '<div class="dw-cal-day-m"><div class="dw-cal-day-m-t">';
                for (b = 0; b < h.length; b++)
                    p += '<div class="dw-cal-day-m-c"' + (h[b].color ? ' style="background:' + h[b].color + ';"' : "") + "></div>";
                p += "</div></div>"
            }
            return {marked: k,selected: C ? !1 : c,cssClass: C && c ? "dw-cal-day-hl" : "",ariaLabel: O || C ? g : "",markup: O && g ? '<div class="dw-cal-day-txt-c"><div class="dw-cal-day-txt ' + 
                (w.eventTextClass || "") + '" title="' + a("<div>" + g + "</div>").text() + '"' + (e ? ' style="background:' + e + ";color:" + o + ';text-shadow:none;"' : "") + ">" + n + g + "</div></div>" : O && n ? '<div class="dw-cal-day-ic-c">' + n + "</div>" : k ? p : ""}
        };
        c.addValue = function(a) {
            E[ha(a)] = a;
            Y()
        };
        c.removeValue = function(a) {
            delete E[ha(a)];
            Y()
        };
        c.setVal = function(a, d, g, h, k) {
            F && (ka(a), a = a ? a[0] : null);
            c.setDate(a, d, k, h, g);
            Y()
        };
        c.getVal = function(a) {
            return F ? u.objectToArray(E) : c.getDate(a)
        };
        c.setValues = function(a, d) {
            c.setDate(a ? a[0] : null, d);
            ka(a);
            Y()
        };
        c.getValues = function() {
            return F ? c.getVal() : [c.getDate()]
        };
        C && (c.addEvent = function(b) {
            var c = [], b = D(!0, [], a.isArray(b) ? b : [b]);
            a.each(b, function(a, b) {
                b._id === r && (b._id = k++);
                J.push(b);
                c.push(b._id)
            });
            Y();
            return c
        }, c.removeEvent = function(b) {
            b = a.isArray(b) ? b : [b];
            a.each(b, function(b, c) {
                a.each(J, function(a, b) {
                    if (b._id === c)
                        return J.splice(a, 1), !1
                })
            });
            Y()
        }, c.getEvents = function(a) {
            var d;
            return a ? (a.setHours(0, 0, 0, 0), d = c.prepareObj(J, a.getFullYear(), a.getMonth()), d[a] ? n(d[a]) : []) : J
        }, c.setEvents = function(b) {
            var c = 
            [];
            J = D(!0, [], b);
            a.each(J, function(a, b) {
                b._id === r && (b._id = k++);
                c.push(b._id)
            });
            Y();
            return c
        });
        D(H, {highlight: !F && !C,divergentDayChange: !F && !C,buttons: C && "inline" !== w.display ? ["cancel"] : w.buttons,parseValue: function(a) {
                var d, g;
                if (F && a) {
                    E = {};
                    a = a.split(",");
                    for (d = 0; d < a.length; d++) {
                        g = N.parseDate(c.format, a[d].replace(/^\s+|\s+$/g, ""), w);
                        E[ha(g)] = g
                    }
                    a = a[0]
                }
                return ea.parseValue.call(this, a)
            },formatValue: function(a) {
                var d, g = [];
                if (F) {
                    for (d in E)
                        g.push(N.formatDate(c.format, E[d], w));
                    return g.join(", ")
                }
                return ea.formatValue.call(this, 
                a)
            },onClear: function() {
                if (F) {
                    E = {};
                    c.refresh()
                }
            },onBeforeShow: function() {
                if (C)
                    w.headerText = false;
                if (w.closeOnSelect)
                    w.divergentDayChange = false;
                if (w.counter && F)
                    w.headerText = function() {
                        var b = 0, c = w.selectType == "week" ? 7 : 1;
                        a.each(E, function() {
                            b++
                        });
                        return b / c + " " + w.selectedText
                    }
            },onMarkupReady: function(b) {
                ea.onMarkupReady.call(this, b);
                y = b;
                if (F) {
                    a(".dwv", b).attr("aria-live", "off");
                    ia = D({}, E)
                }
                O && a(".dw-cal", b).addClass("dw-cal-ev");
                q && a(".dw-cal", b).addClass("dw-cal-m-" + q);
                if (C) {
                    b.addClass("dw-cal-em");
                    v = 
                    a('<div class="dw-cal-events ' + (w.eventBubbleClass || "") + '"><div class="dw-cal-events-arr"></div><div class="dw-cal-events-i"><div class="dw-cal-events-sc"></div></div></div>').appendTo(a(".dw-cal-c", b));
                    V = a(".dw-cal-events-i", v);
                    W = a(".dw-cal-events-sc", v);
                    s = new g.classes.ScrollView(V[0]);
                    c.tap(V, function() {
                        s.scrolled || aa()
                    })
                }
            },onMonthChange: function() {
                C && aa()
            },onSelectShow: function() {
                C && aa()
            },onMonthLoaded: function() {
                if (o) {
                    la(o.d, a('.dw-cal-day-v[data-full="' + o.full + '"]:not(.dw-cal-day-diff)', y));
                    o = false
                }
            },onDayChange: function(b) {
                var d = b.date, g = ha(d), h = a(b.cell), b = b.selected;
                if (C) {
                    aa();
                    h.hasClass("dw-cal-day-ev") || setTimeout(function() {
                        c.changing ? o = {d: g,full: h.attr("data-full")} : la(g, h)
                    }, 10)
                } else if (F)
                    if (w.selectType == "week") {
                        var k, e, n = g.getDay() - fa, n = n < 0 ? 7 + n : n;
                        w.multiSelect || (E = {});
                        for (k = 0; k < 7; k++) {
                            e = new Date(g.getFullYear(), g.getMonth(), g.getDate() - n + k);
                            b ? delete E[e] : E[e] = e
                        }
                        Y()
                    } else {
                        k = a('.dw-cal .dw-cal-day[data-full="' + h.attr("data-full") + '"]', y);
                        if (b) {
                            k.removeClass("dw-sel").removeAttr("aria-selected").find(".dw-i").removeClass(T);
                            delete E[g]
                        } else {
                            k.addClass("dw-sel").attr("aria-selected", "true").find(".dw-i").addClass(T);
                            E[g] = g
                        }
                    }
                if (!C && !w.multiSelect && w.closeOnSelect && w.display !== "inline") {
                    c.needsSlide = false;
                    c.setDate(d);
                    c.select();
                    return false
                }
            },onCalResize: function() {
                I && qa(Z)
            },onCancel: function() {
                !c.live && F && (E = D({}, ia))
            }});
        return H
    }
})(jQuery, window, document);
(function(a) {
    var t, n, r, g = a.mobiscroll, D = g.themes;
    n = navigator.userAgent.match(/Android|iPhone|iPad|iPod|Windows|Windows Phone|MSIE/i);
    if (/Android/i.test(n)) {
        if (t = "android-holo", n = navigator.userAgent.match(/Android\s+([\d\.]+)/i))
            n = n[0].replace("Android ", ""), t = 4 <= n.split(".")[0] ? "android-holo" : "android"
    } else if (/iPhone/i.test(n) || /iPad/i.test(n) || /iPod/i.test(n)) {
        if (t = "ios", n = navigator.userAgent.match(/OS\s+([\d\_]+)/i))
            n = n[0].replace(/_/g, ".").replace("OS ", ""), t = "7" <= n ? "ios" : "ios-classic"
    } else if (/Windows/i.test(n) || 
    /MSIE/i.test(n) || /Windows Phone/i.test(n))
        t = "wp";
    a.each(D, function(n, D) {
        a.each(D, function(a, n) {
            if (n.baseTheme == t)
                return g.autoTheme = a, r = !0, !1;
            a == t && (g.autoTheme = a)
        });
        if (r)
            return !1
    })
})(jQuery);
